diff --git a/build.gradle b/build.gradle index 3a4ee0c..13206d0 100644 --- a/build.gradle +++ b/build.gradle @@ -22,13 +22,14 @@ group= "fr.jackcartersmith.orbsat" // http://maven.apache.org/guides/mini/guide- archivesBaseName = "OrbitalSatellite" apply plugin: 'java' -sourceCompatibility = 1.8 -targetCompatibility = 1.8 +sourceCompatibility = 1.7 +targetCompatibility = 1.7 minecraft { version = "1.7.10-10.13.4.1558-1.7.10" replace '${version}', project.version - runDir = "eclipse" + runDir = "rundir" + mappings = 'stable_12' } dependencies { diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.location b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.location deleted file mode 100644 index 2b36984..0000000 Binary files a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.location and /dev/null differ diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs b/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 466d7f9..0000000 --- a/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,4 +0,0 @@ -#Sun Jun 05 18:58:07 CEST 2011 -version=1 -eclipse.preferences.version=1 -refresh.enabled=true diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs b/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs deleted file mode 100644 index 94c5676..0000000 --- a/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs +++ /dev/null @@ -1,7 +0,0 @@ -#Sun Jun 05 19:03:53 CEST 2011 -eclipse.preferences.version=1 -org.eclipse.debug.ui.UseContextualLaunch=false -Console.highWaterMark=88000 -org.eclipse.debug.ui.PREF_LAUNCH_PERSPECTIVES=\r\n\r\n -org.eclipse.debug.ui.user_view_bindings=\r\n\r\n\r\n\r\n\r\n\r\n -StringVariablePreferencePage=130,107,107,86, diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.epp.usagedata.gathering.prefs b/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.epp.usagedata.gathering.prefs deleted file mode 100644 index 333b991..0000000 --- a/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.epp.usagedata.gathering.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Sun Jun 05 18:58:07 CEST 2011 -eclipse.preferences.version=1 -org.eclipse.epp.usagedata.gathering.enabled=false diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs b/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 12ec368..0000000 --- a/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -#Sun Sep 18 16:44:39 NZST 2011 -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=ignore -org.eclipse.jdt.core.compiler.problem.deprecation=ignore -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore -org.eclipse.jdt.core.compiler.problem.unusedImport=ignore -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore -org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore -org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignore -org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs b/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs deleted file mode 100644 index 316ef6f..0000000 --- a/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs +++ /dev/null @@ -1,4 +0,0 @@ -#Sun Jun 05 18:58:05 CEST 2011 -spacesForTabs=true -eclipse.preferences.version=1 -overviewRuler_migration=migrated_3.1 diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs b/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs deleted file mode 100644 index ae368ab..0000000 --- a/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Sun Jun 05 18:58:07 CEST 2011 -IMPORT_FILES_AND_FOLDERS_MODE=prompt -IMPORT_FILES_AND_FOLDERS_VIRTUAL_FOLDER_MODE=prompt -SAVE_ALL_BEFORE_BUILD=true -eclipse.preferences.version=1 -tipsAndTricks=true -platformState=1287081747687 -quickStart=false -PROBLEMS_FILTERS_MIGRATE=true diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs b/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs deleted file mode 100644 index cbc5953..0000000 --- a/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Sun Jun 05 18:50:08 CEST 2011 -eclipse.preferences.version=1 -showIntro=false diff --git a/eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches/Client.launch b/eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches/Client.launch deleted file mode 100644 index a639572..0000000 --- a/eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches/Client.launch +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches/Server.launch b/eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches/Server.launch deleted file mode 100644 index 395f317..0000000 --- a/eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches/Server.launch +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/eclipse/.metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml b/eclipse/.metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml deleted file mode 100644 index 1208f60..0000000 --- a/eclipse/.metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/java/fr/jackcartersmith/orbsat/OrbitalSatellite.java b/src/main/java/fr/jackcartersmith/orbsat/OrbitalSatellite.java index 4654a23..e3041de 100644 --- a/src/main/java/fr/jackcartersmith/orbsat/OrbitalSatellite.java +++ b/src/main/java/fr/jackcartersmith/orbsat/OrbitalSatellite.java @@ -16,7 +16,7 @@ import fr.jackcartersmith.orbsat.common.utils.OSLogHelper; public class OrbitalSatellite { //============== DEBUG MODE ===============// - public static boolean debug = false; + public static boolean debug = true; //=========================================// @Mod.Instance(OSRefs.MODID) diff --git a/src/main/java/fr/jackcartersmith/orbsat/client/model/ModelDefender.java b/src/main/java/fr/jackcartersmith/orbsat/client/model/ModelDefender.java index a92427f..977adeb 100644 --- a/src/main/java/fr/jackcartersmith/orbsat/client/model/ModelDefender.java +++ b/src/main/java/fr/jackcartersmith/orbsat/client/model/ModelDefender.java @@ -6,6 +6,215 @@ import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.client.renderer.OpenGlHelper; +/** + * ModelDefender - JackCarterSmith + * Created using Tabula 4.1.1 + */ +public class ModelDefender extends ModelBase { + public ModelRenderer crystalPlateforme; + public ModelRenderer crystal; + public ModelRenderer photonInjector; + public ModelRenderer basePlateforme; + public ModelRenderer crystalPlateforme2; + public ModelRenderer photonInjector_1; + public ModelRenderer baseSide1; + public ModelRenderer baseSide2; + public ModelRenderer baseSide3; + public ModelRenderer baseSide4; + public ModelRenderer crystalArmSupport1; + public ModelRenderer crystalArmSupport2; + public ModelRenderer crystalArmSupport3; + public ModelRenderer crystalArmSupport4; + public ModelRenderer shape13; + public ModelRenderer shape14; + public ModelRenderer shape15; + public ModelRenderer shape16; + public ModelRenderer shape17; + public ModelRenderer shape18; + public ModelRenderer support1; + public ModelRenderer support2; + public ModelRenderer support3; + public ModelRenderer support4; + public ModelRenderer support5; + public ModelRenderer support6; + public ModelRenderer support7; + public ModelRenderer support8; + + public ModelDefender() { + this.textureWidth = 128; + this.textureHeight = 128; + this.shape15 = new ModelRenderer(this, 0, 64); + this.shape15.setRotationPoint(2.0F, 17.0F, 0.0F); + this.shape15.addBox(0.0F, 0.0F, 0.0F, 2, 1, 1, 0.0F); + this.basePlateforme = new ModelRenderer(this, 0, 0); + this.basePlateforme.setRotationPoint(-8.0F, 23.0F, -8.0F); + this.basePlateforme.addBox(0.0F, 0.0F, 0.0F, 16, 1, 16, 0.0F); + this.photonInjector_1 = new ModelRenderer(this, 0, 17); + this.photonInjector_1.setRotationPoint(-2.0F, 11.0F, -2.0F); + this.photonInjector_1.addBox(0.0F, 0.0F, 0.0F, 4, 12, 4, 0.0F); + this.baseSide1 = new ModelRenderer(this, 16, 17); + this.baseSide1.mirror = true; + this.baseSide1.setRotationPoint(-8.0F, 19.0F, -8.0F); + this.baseSide1.addBox(0.0F, 0.0F, 0.0F, 16, 4, 1, 0.0F); + this.crystalArmSupport1 = new ModelRenderer(this, 0, 33); + this.crystalArmSupport1.setRotationPoint(-6.0F, -1.000000000000001F, -6.0F); + this.crystalArmSupport1.addBox(0.0F, 0.0F, 0.0F, 2, 24, 2, 0.0F); + this.shape16 = new ModelRenderer(this, 6, 64); + this.shape16.setRotationPoint(0.0F, 21.0F, -5.0F); + this.shape16.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F); + this.baseSide4 = new ModelRenderer(this, 16, 17); + this.baseSide4.mirror = true; + this.baseSide4.setRotationPoint(8.0F, 19.0F, -8.0F); + this.baseSide4.addBox(0.0F, 0.0F, 0.0F, 16, 4, 1, 0.0F); + this.setRotateAngle(baseSide4, 0.0F, -1.5707963267948966F, 0.0F); + this.shape14 = new ModelRenderer(this, 0, 68); + this.shape14.setRotationPoint(3.0F, 18.0F, 0.0F); + this.shape14.addBox(0.0F, 0.0F, 0.0F, 1, 5, 1, 0.0F); + this.shape17 = new ModelRenderer(this, 10, 64); + this.shape17.mirror = true; + this.shape17.setRotationPoint(-1.0F, 14.0F, 2.0F); + this.shape17.addBox(0.0F, 0.0F, 0.0F, 1, 9, 1, 0.0F); + this.support8 = new ModelRenderer(this, 52, 4); + this.support8.mirror = true; + this.support8.setRotationPoint(5.0F, 8.0F, 5.0F); + this.support8.addBox(0.0F, 0.0F, -0.5F, 5, 1, 1, -0.2F); + this.setRotateAngle(support8, 0.0F, 2.356194490192345F, 0.0F); + this.crystalArmSupport4 = new ModelRenderer(this, 0, 33); + this.crystalArmSupport4.setRotationPoint(4.0F, -1.000000000000001F, -6.0F); + this.crystalArmSupport4.addBox(0.0F, 0.0F, 0.0F, 2, 24, 2, 0.0F); + this.support5 = new ModelRenderer(this, 52, 4); + this.support5.mirror = true; + this.support5.setRotationPoint(-5.0F, 8.0F, 5.0F); + this.support5.addBox(0.0F, 0.0F, -0.5F, 5, 1, 1, -0.2F); + this.setRotateAngle(support5, 0.0F, 0.7853981633974483F, 0.0F); + this.crystalPlateforme = new ModelRenderer(this, 0, 0); + this.crystalPlateforme.setRotationPoint(-1.5F, 10.0F, -1.5F); + this.crystalPlateforme.addBox(0.0F, 0.0F, 0.0F, 3, 1, 3, 0.0F); + this.support6 = new ModelRenderer(this, 52, 4); + this.support6.mirror = true; + this.support6.setRotationPoint(-5.0F, 8.0F, -5.0F); + this.support6.addBox(0.0F, 0.0F, -0.5F, 5, 1, 1, -0.2F); + this.setRotateAngle(support6, 0.0F, -0.7853981633974483F, 0.0F); + this.photonInjector = new ModelRenderer(this, 8, 33); + this.photonInjector.setRotationPoint(0.0F, -6.0F, -3.5F); + this.photonInjector.addBox(0.0F, 0.0F, 0.0F, 5, 12, 5, 0.0F); + this.setRotateAngle(photonInjector, 0.0F, -0.7853981633974483F, 0.0F); + this.crystalArmSupport2 = new ModelRenderer(this, 0, 33); + this.crystalArmSupport2.setRotationPoint(-6.0F, -1.000000000000001F, 4.0F); + this.crystalArmSupport2.addBox(0.0F, 0.0F, 0.0F, 2, 24, 2, 0.0F); + this.shape13 = new ModelRenderer(this, 0, 64); + this.shape13.setRotationPoint(0.0F, 20.0F, -5.0F); + this.shape13.addBox(0.0F, 0.0F, 0.0F, 1, 1, 3, 0.0F); + this.shape18 = new ModelRenderer(this, 10, 64); + this.shape18.mirror = true; + this.shape18.setRotationPoint(-3.0F, 16.0F, 0.0F); + this.shape18.addBox(0.0F, 0.0F, 0.0F, 1, 7, 1, 0.0F); + this.baseSide2 = new ModelRenderer(this, 16, 17); + this.baseSide2.mirror = true; + this.baseSide2.setRotationPoint(-8.0F, 19.0F, 8.0F); + this.baseSide2.addBox(0.0F, 0.0F, 0.0F, 16, 4, 1, 0.0F); + this.setRotateAngle(baseSide2, 0.0F, 1.5707963267948966F, 0.0F); + this.crystal = new ModelRenderer(this, 0, 4); + this.crystal.setRotationPoint(0.0F, 8.5F, 0.0F); + this.crystal.addBox(-1.0F, -1.0F, -1.0F, 2, 2, 2, 0.0F); + //this.Shape7.addBox(-3.0F, -3.0F, -3.0F, 6, 6, 6); + //this.Shape7.setRotationPoint(0.0F, -4.0F, 0.0F); + this.support1 = new ModelRenderer(this, 52, 0); + this.support1.mirror = true; + this.support1.setRotationPoint(-5.0F, 1.0F, 5.0F); + this.support1.addBox(0.0F, 0.0F, -0.5F, 5, 3, 1, 0.0F); + this.setRotateAngle(support1, 0.0F, 0.7853981633974483F, 0.0F); + this.crystalArmSupport3 = new ModelRenderer(this, 0, 33); + this.crystalArmSupport3.setRotationPoint(4.0F, -1.000000000000001F, 4.0F); + this.crystalArmSupport3.addBox(0.0F, 0.0F, 0.0F, 2, 24, 2, 0.0F); + this.support4 = new ModelRenderer(this, 52, 0); + this.support4.mirror = true; + this.support4.setRotationPoint(5.0F, 1.0F, 5.0F); + this.support4.addBox(0.0F, 0.0F, -0.5F, 5, 3, 1, 0.0F); + this.setRotateAngle(support4, 0.0F, 2.356194490192345F, 0.0F); + this.support2 = new ModelRenderer(this, 52, 0); + this.support2.mirror = true; + this.support2.setRotationPoint(-5.0F, 1.0F, -5.0F); + this.support2.addBox(0.0F, 0.0F, -0.5F, 5, 3, 1, 0.0F); + this.setRotateAngle(support2, 0.0F, -0.7853981633974483F, 0.0F); + this.support3 = new ModelRenderer(this, 52, 0); + this.support3.mirror = true; + this.support3.setRotationPoint(5.0F, 1.0F, -5.0F); + this.support3.addBox(0.0F, 0.0F, -0.5F, 5, 3, 1, 0.0F); + this.setRotateAngle(support3, 0.0F, -2.356194490192345F, 0.0F); + this.support7 = new ModelRenderer(this, 52, 4); + this.support7.mirror = true; + this.support7.setRotationPoint(5.0F, 8.0F, -5.0F); + this.support7.addBox(0.0F, 0.0F, -0.5F, 5, 1, 1, -0.2F); + this.setRotateAngle(support7, 0.0F, -2.356194490192345F, 0.0F); + this.crystalPlateforme2 = new ModelRenderer(this, 0, 0); + this.crystalPlateforme2.setRotationPoint(-1.5F, 6.0F, -1.5F); + this.crystalPlateforme2.addBox(0.0F, 0.0F, 0.0F, 3, 1, 3, 0.0F); + this.baseSide3 = new ModelRenderer(this, 16, 17); + this.baseSide3.mirror = true; + this.baseSide3.setRotationPoint(8.0F, 19.0F, 8.0F); + this.baseSide3.addBox(0.0F, 0.0F, 0.0F, 16, 4, 1, 0.0F); + this.setRotateAngle(baseSide3, 0.0F, -3.141592653589793F, 0.0F); + } + + public void render() { + this.shape15.render(0.0625F); + this.basePlateforme.render(0.0625F); + this.photonInjector_1.render(0.0625F); + this.baseSide1.render(0.0625F); + this.crystalArmSupport1.render(0.0625F); + this.shape16.render(0.0625F); + this.baseSide4.render(0.0625F); + this.shape14.render(0.0625F); + this.shape17.render(0.0625F); + this.support8.render(0.0625F); + this.crystalArmSupport4.render(0.0625F); + this.support5.render(0.0625F); + this.crystalPlateforme.render(0.0625F); + this.support6.render(0.0625F); + this.photonInjector.render(0.0625F); + this.crystalArmSupport2.render(0.0625F); + this.shape13.render(0.0625F); + this.shape18.render(0.0625F); + this.baseSide2.render(0.0625F); + this.support1.render(0.0625F); + this.crystalArmSupport3.render(0.0625F); + this.support4.render(0.0625F); + this.support2.render(0.0625F); + this.support3.render(0.0625F); + this.support7.render(0.0625F); + this.crystalPlateforme2.render(0.0625F); + this.baseSide3.render(0.0625F); + } + + public void renderCrystal(float brightness) { + float lastBrightnessX = OpenGlHelper.lastBrightnessX; + float lastBrightnessY = OpenGlHelper.lastBrightnessY; + + float b = brightness * 200F; + float colour = Math.min(2F, (brightness * 2F) + 0.5F); + if (brightness > 0F) GL11.glDisable(GL11.GL_LIGHTING); + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, Math.min(200F, lastBrightnessX + b), Math.min(200F, lastBrightnessY + b)); + GL11.glColor4f(colour*10F, colour*0F, colour*20F, 0.9F); + this.crystal.render(0.0625F); + GL11.glDisable(GL11.GL_BLEND); + OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lastBrightnessX, lastBrightnessY); + if (brightness > 0F) GL11.glEnable(GL11.GL_LIGHTING); + } + + /** + * This is a helper function from Tabula to set the rotation of model parts + */ + public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) { + modelRenderer.rotateAngleX = x; + modelRenderer.rotateAngleY = y; + modelRenderer.rotateAngleZ = z; + } +} + +/* v1.0 public class ModelDefender extends ModelBase { public ModelRenderer Shape1; public ModelRenderer Shape2; @@ -61,7 +270,6 @@ public class ModelDefender extends ModelBase { this.Shape7.setRotationPoint(0.0F, -4.0F, 0.0F); this.Shape7.setTextureSize(128, 128); this.Shape7.mirror = true; - //this.setRotateAngle(this.Shape7, ((float)Math.sin(0)), (float)Math.sin(Math.PI/2), (float)Math.sin(3*Math.PI/2)); this.Shape8 = new ModelRenderer(this, 10, 26); this.Shape8.addBox(-3.0F, 0.0F, -3.0F, 6, 2, 6); this.Shape8.setRotationPoint(0.0F, 20.0F, 0.0F); @@ -97,12 +305,10 @@ public class ModelDefender extends ModelBase { if (brightness > 0F) GL11.glEnable(GL11.GL_LIGHTING); } - /** - * This is a helper function from Tabula to set the rotation of model parts - */ public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) { modelRenderer.rotateAngleX = x; modelRenderer.rotateAngleY = y; modelRenderer.rotateAngleZ = z; } } +*/ diff --git a/src/main/java/fr/jackcartersmith/orbsat/client/render/tile/RenderTileDefender.java b/src/main/java/fr/jackcartersmith/orbsat/client/render/tile/RenderTileDefender.java index cc838ac..2751f29 100644 --- a/src/main/java/fr/jackcartersmith/orbsat/client/render/tile/RenderTileDefender.java +++ b/src/main/java/fr/jackcartersmith/orbsat/client/render/tile/RenderTileDefender.java @@ -29,7 +29,7 @@ public class RenderTileDefender extends TileEntitySpecialRenderer { RenderTileDefender.modelDefender.render(); float ticks = ((float)Minecraft.getMinecraft().renderViewEntity.ticksExisted + partialTick) * tile.rotationSpeed; - if (tile.getWorldObj() != null) + if (tile.getWorld() != null) { GL11.glRotatef(ticks % 360.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(35.0F, 1.0F, 0.0F, 0.0F); @@ -41,7 +41,7 @@ public class RenderTileDefender extends TileEntitySpecialRenderer { */ } - GL11.glTranslatef(-0.125F,0.125F,0.125F); + GL11.glTranslatef(0.3F,-0.22F,-0.3F); RenderTileDefender.modelDefender.renderCrystal(tile.crystalBrightness); GL11.glPopMatrix(); diff --git a/src/main/java/fr/jackcartersmith/orbsat/common/blocks/BlockOS.java b/src/main/java/fr/jackcartersmith/orbsat/common/blocks/BlockOS.java index f6a626b..d69128b 100644 --- a/src/main/java/fr/jackcartersmith/orbsat/common/blocks/BlockOS.java +++ b/src/main/java/fr/jackcartersmith/orbsat/common/blocks/BlockOS.java @@ -31,7 +31,7 @@ public class BlockOS extends Block{ @Override @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) { + public void registerIcons(IIconRegister iconRegister) { this.blockIcon = iconRegister.registerIcon(OSRefs.RESOURCESPREFIX + getUnwrappedUnlocalizedName(super.getUnlocalizedName())); } } diff --git a/src/main/java/fr/jackcartersmith/orbsat/common/blocks/Defender.java b/src/main/java/fr/jackcartersmith/orbsat/common/blocks/Defender.java index 6a37549..58fac0b 100644 --- a/src/main/java/fr/jackcartersmith/orbsat/common/blocks/Defender.java +++ b/src/main/java/fr/jackcartersmith/orbsat/common/blocks/Defender.java @@ -18,7 +18,7 @@ import net.minecraft.world.World; public class Defender extends BlockOS { public Defender() { super(Material.iron); - this.setBlockName(OSStrings.defenderName); + this.setUnlocalizedName(OSStrings.defenderName); this.setCreativeTab(OrbitalSatellite.OSCreaTab); this.setStepSound(soundTypeStone); OSBlocks.register(this); @@ -26,7 +26,7 @@ public class Defender extends BlockOS { @SideOnly(Side.CLIENT) @Override - public void registerBlockIcons(IIconRegister iconRegister) { + public void registerIcons(IIconRegister iconRegister) { blockIcon = iconRegister.registerIcon(OSRefs.RESOURCESPREFIX + "machine"); } diff --git a/src/main/java/fr/jackcartersmith/orbsat/common/lib/OSRefs.java b/src/main/java/fr/jackcartersmith/orbsat/common/lib/OSRefs.java index c8726a9..df6e75a 100644 --- a/src/main/java/fr/jackcartersmith/orbsat/common/lib/OSRefs.java +++ b/src/main/java/fr/jackcartersmith/orbsat/common/lib/OSRefs.java @@ -3,7 +3,7 @@ package fr.jackcartersmith.orbsat.common.lib; public class OSRefs { public static final String MODID = "orbsat"; public static final String MODNAME = "Orbital Satellite"; - public static final String VERSION = "0.1"; + public static final String VERSION = "0.1.8"; public static final String MCVERSION = "1.7.10"; public static final String CLIENTPROXYLOCATION = "fr.jackcartersmith.orbsat.client.ClientProxy"; public static final String SERVERPROXYLOCATION = "fr.jackcartersmith.orbsat.common.CommonProxy"; diff --git a/src/main/java/fr/jackcartersmith/orbsat/common/tileentities/TileDefender.java b/src/main/java/fr/jackcartersmith/orbsat/common/tileentities/TileDefender.java index 9d0a272..79b463e 100644 --- a/src/main/java/fr/jackcartersmith/orbsat/common/tileentities/TileDefender.java +++ b/src/main/java/fr/jackcartersmith/orbsat/common/tileentities/TileDefender.java @@ -16,9 +16,8 @@ import net.minecraftforge.common.util.ForgeDirection; public class TileDefender extends TileEntity { public float modelIllumination = 30F; public int facingDirection = ForgeDirection.UP.ordinal(); - public boolean running = false; - public boolean runningCach = false; - public int pow = 75; + public boolean firing = false; + public int beamPow = 100; public float rotationSpeed = 4.0F; public float crystalBrightness = 1.0F; @@ -28,23 +27,9 @@ public class TileDefender extends TileEntity { @Override public void updateEntity() { - /* - if (this.rotation != 1.0F) - { - if (this.rotation < 1.0F) - { - this.rotation += Math.max(this.rotation / 10.0F, 0.001F); - } - - if ((double)this.rotation > 0.999D) - { - this.rotation = 1.0F; - } - } - */ - + if (worldObj.isRemote) - beam = OrbitalSatellite.proxy.energyBeam(worldObj, this.xCoord + 0.52F, this.yCoord, this.zCoord + 0.48F, this.xCoord, this.yCoord + 1024, this.zCoord, pow, 8, beam, true, 0); + beam = OrbitalSatellite.proxy.energyBeam(worldObj, this.xCoord + 0.52F, this.yCoord, this.zCoord + 0.48F, this.xCoord, this.yCoord + 1024, this.zCoord, beamPow, 8, beam, true, 0); @@ -116,7 +101,7 @@ public class TileDefender extends TileEntity { @Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { - readFromNBT(pkt.func_148857_g()); + readFromNBT(pkt.getNbtCompound()); } /*