From f029903bead33b88b58d7d82517e2e6991bffb44 Mon Sep 17 00:00:00 2001 From: Matti Ruohonen Date: Sat, 6 May 2017 17:07:24 +0300 Subject: [PATCH 1/4] Ported to MC 1.11.2 (#105) * Update mappings to stable_29 and fix compiler warnings * Add MethodHandles and reflection for the private stuff * Update gradle and wrapper * Fix infinite NBT tag recursion in getUpdateTag(). Fixes #101. * Fix the Pusher/Puller not dropping with correct metadata. Fixes #100. * Disable unused ATs * Fix the NBT recursion fix... Movement animation now works again. * Fix pushers/pullers/etc getting stuck * Fix onBlockActivated return values. Fixes missing sounds. * Fix culling on moving tiles * Fix a single player crash caused by the fix to pushers getting stuck Basically, don't try to start movement from the client side TEs. * Update to Minecraft 1.11.2 * Fix a crash in the Slider and Teleporter with getDamageDropped() * Add a safe way of getting the TE inside getActualState() It is only used in BlockSlider atm. --- build.gradle | 10 +- gradle/wrapper/gradle-wrapper.jar | Bin 51017 -> 53324 bytes gradle/wrapper/gradle-wrapper.properties | 4 +- gradlew | 52 +++++----- gradlew.bat | 8 +- .../funkylocomotion/CreativeTabFrames.java | 10 +- .../EntityMovingEventHandler.java | 16 ++- .../funkylocomotion/FunkyLocomotion.java | 15 +-- .../rwtema/funkylocomotion/ProxyClient.java | 2 +- .../api/FunkyCapabilities.java | 2 +- .../funkylocomotion/api/IAdvStickyBlock.java | 2 - .../funkylocomotion/blocks/BlockBooster.java | 15 +-- .../blocks/BlockFLMultiState.java | 4 +- .../funkylocomotion/blocks/BlockFrame.java | 9 +- .../blocks/BlockFrameProjector.java | 19 ++-- .../funkylocomotion/blocks/BlockMoving.java | 29 +++--- .../funkylocomotion/blocks/BlockPusher.java | 30 ++++-- .../funkylocomotion/blocks/BlockSlider.java | 28 +++-- .../blocks/BlockStickyFrame.java | 16 +-- .../funkylocomotion/blocks/BlockTeleport.java | 24 +++-- .../blocks/TileMovingBase.java | 14 +-- .../blocks/TileMovingClient.java | 27 +++-- .../blocks/TileMovingServer.java | 35 +++---- .../funkylocomotion/blocks/TilePusher.java | 29 +++--- .../funkylocomotion/blocks/TileSlider.java | 2 +- .../funkylocomotion/blocks/TileTeleport.java | 34 +++--- .../funkylocomotion/compat/CompatHandler.java | 1 + .../debug/DebugEventHandler.java | 3 +- .../description/Describer.java | 2 +- .../fakes/FakeWorldClient.java | 4 +- .../funkylocomotion/helper/BlockHelper.java | 95 ++++++++++++++--- .../funkylocomotion/helper/ItemHelper.java | 2 +- .../helper/MethodHandleUtils.java | 59 +++++++++++ .../funkylocomotion/helper/WeakSet.java | 2 - .../funkylocomotion/items/ItemBlockFrame.java | 19 ++-- .../items/ItemBlockTeleporter.java | 31 +++--- .../funkylocomotion/items/ItemWrench.java | 34 +++--- .../funkylocomotion/movers/MoveManager.java | 31 +++--- .../movers/MoverEventHandler.java | 4 +- .../movers/MovingTileRegistry.java | 2 +- .../funkylocomotion/network/FLNetwork.java | 4 +- .../network/MessageClearTile.java | 2 +- .../network/MessageObstruction.java | 2 +- .../particles/ObstructionHelper.java | 25 ++++- .../rendering/PassHandler.java | 10 +- .../funkylocomotion/rendering/TESRMoving.java | 58 ++++++----- .../resources/META-INF/funkylocomotion_at.cfg | 98 +++++++++--------- 47 files changed, 543 insertions(+), 381 deletions(-) create mode 100644 src/main/java/com/rwtema/funkylocomotion/helper/MethodHandleUtils.java diff --git a/build.gradle b/build.gradle index f5dd7b3..12fc973 100644 --- a/build.gradle +++ b/build.gradle @@ -9,14 +9,14 @@ buildscript { } apply plugin: 'net.minecraftforge.gradle.forge' -version = "0.0.3" +version = "0.0.3-masafixes.5" group= "com.rwtema.funkylocomotion" // http://maven.apache.org/guides/mini/guide-naming-conventions.html -archivesBaseName = "funky-locomotion-1.10.2-alpha" +archivesBaseName = "funky-locomotion-1.11.2-alpha" minecraft { - version = "1.10.2-12.18.2.2114" + version = "1.11.2-13.20.0.2230" runDir = "run" - mappings = "snapshot_20161029" + mappings = "snapshot_20170214" makeObfSourceJar = false } @@ -31,7 +31,7 @@ minecraft { } dependencies { - deobfCompile "mezz.jei:jei_1.10.2:3.12.7.312" + deobfCompile "mezz.jei:jei_1.11.2:4.2.4.226" } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index b7612167031001b7b84baf2a959e8ea8ad03c011..3baa851b28c65f87dd36a6748e1a85cf360c1301 100644 GIT binary patch delta 28971 zcmZ6yQ*iZY;JFhD?1P(WZ}50VK8%RPitllXkGJdf@O1SSXu{K)Bqk6V797-udW)kWHU^DD zMRVl_A62K_h6G{sPwQ_VxN%JVy$Ze1b`?HT$)$l(L(NK`-=2&7+!zn^f-ls@tAh}) zh#gN){s1)D@>WddYQiT{a`_jtHDqNk5|Z0ygX_vxsN~f>nq;_@OCqGklSe9)AulaN zvq?Ltou`n^q;3&a55_BS|FNvBM_6^NR2|`Kl@5KXER%Fh2sm8%hM(VnBYUD`Uj7Q> zJpoY3URD*EjzUOO-fbhQDJfGX#DQAdaE)971;7aijTJQpi)Jy7izzc*Ysy73&&Sv; z2{Alhy<(t@#~oz*p0(-duk`^Dz6E>&T+e~}Pr#tr*ta@2aP>?!kcj)QC$Bl@Fh8t? zkKEAh4>%opKRPifMoYCwKp0l8oYa?uwL6PAiK?cJi&jcvQh2ZmUnTQVSuEnhRQFzgCH%@}1(|nw-9bSK?g>j;+_)O;&(w)H&<*!i?&j zEd5#FM_~ZbHPg>!a3MP%k>@&aCFNx%Ja$D=>}B+?J*+{Xp#?jtkAJcaG;Q7Euoeui z4lPmQ3U`)RHyeV;Lp@tsr{gu^4Nt=6d6q%mxqfi zUVHnjz-Hb0tG4WE{ouf(!_Dg(*fZ3zUv%kAf1KP@#c;a82aU19W&0EV(B8A7#jh$J zluiL+LV@AMcDSDN3{q-&3=YIE=Qd!OfPcb(l*8{M(1zcx3mBmc(0a*yxt~A{v-7T) za@?tA$Koyp|2!#QfjRXga|y9Ts~BbfU`#M3;fp8QfQ4av*7qR#Deji{NF3Gy-IYiUbjsuQM

+3 zu)7nE_?&1&PS~c(&@4iS=>M`}ahx7R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51dhI>#{Xd!%**+66;;U8qFE!1Rxh=^8o<~rb^ zpspdk;ea&rp9AcTi1Yw_gG2@*XhnGdKZ*bU4-#?)dlREQfFIKVykPjh9eofAIQ`2UVxDLA6xPyK;sjz2Jr*9pA?nx|F+^ugo-Ch z0gMkyR2&2#;`T=iPhwU)0mria?JN01yZ`SF!+)?~Z&LmT;Nu=c;s@}5Ys8_TDE>i0 z&S38#i3c!B2jRm7eq05}+JOzTCihU0hKC9=?|AjV@??eC6PCSq58(IENTA*htOxMF z-f;+!@(I{T6?EIdM)v1t@}I983JUKD=v);f-$||W2lPh{$^P(gp#MEXl0iV-316!H z@6JjVLo0KZ{~i24$`RdXvHTEiCCJUj_OJ4vp3|sI%7_Tm+w%ynFOX-Cgn)q%^MBH) z{BwZ4({vxe2M&m!#(o44NjK5M;|C>l|BzVs5Wtw&JjgLVll~!jB%g)Iv+N&? zO1YwdNP7RunR^LfTtENiK?E^)Vg76QsYm@k%V6)%Um*T<&WEx3D$Hf&4h;qM92N?S z?>`KrbsJuwsUUvP+rGb+-uDr})c8DD3hQHkP=4Y@c%p3T2LV1>&_fp-&4l!y4)POz z`XKoo_rNwdgaFd+$A4gy95LC8f`F4CSK}%8H1Xd~HumHF9h80on8{?wO@a?XA7FhT z043LB*Fy-%AOwt0niQS^=`;oC$>=2y5WvKI|ChL}27S-QAqxBf zQ6K`n9VC2gh29_m%vSCL33@pZsAll-x`UwJB>WlKTL{7HCj^W|AhxPE|BWo`5CP2Z z;s*koA(BVZ2#8Fz>_Ij-MDx(Kf8SUTGSVl6dljJLMsl3@vha|5>`&SYR;V_}G77uO HKmYwdM#_19 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 678d9d8..b430ae5 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Jul 02 15:54:47 CDT 2014 +#Tue Feb 07 06:54:21 EET 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip diff --git a/gradlew b/gradlew index 91a7e26..27309d9 100644 --- a/gradlew +++ b/gradlew @@ -6,12 +6,30 @@ ## ############################################################################## -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" @@ -30,6 +48,7 @@ die ( ) { cygwin=false msys=false darwin=false +nonstop=false case "`uname`" in CYGWIN* ) cygwin=true @@ -40,31 +59,11 @@ case "`uname`" in MINGW* ) msys=true ;; + NONSTOP* ) + nonstop=true + ;; esac -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. @@ -90,7 +89,7 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then MAX_FD_LIMIT=`ulimit -H -n` if [ $? -eq 0 ] ; then if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then @@ -114,6 +113,7 @@ fi if $cygwin ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` diff --git a/gradlew.bat b/gradlew.bat index 8a0b282..832fdb6 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -8,14 +8,14 @@ @rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - set DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome @@ -46,7 +46,7 @@ echo location of your Java installation. goto fail :init -@rem Get command-line arguments, handling Windowz variants +@rem Get command-line arguments, handling Windows variants if not "%OS%" == "Windows_NT" goto win9xME_args if "%@eval[2+2]" == "4" goto 4NT_args diff --git a/src/main/java/com/rwtema/funkylocomotion/CreativeTabFrames.java b/src/main/java/com/rwtema/funkylocomotion/CreativeTabFrames.java index 7e411fe..29f1d55 100644 --- a/src/main/java/com/rwtema/funkylocomotion/CreativeTabFrames.java +++ b/src/main/java/com/rwtema/funkylocomotion/CreativeTabFrames.java @@ -1,10 +1,10 @@ package com.rwtema.funkylocomotion; +import javax.annotation.Nonnull; +import org.apache.commons.lang3.Validate; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; -import org.apache.commons.lang3.Validate; - -import javax.annotation.Nonnull; +import net.minecraft.item.ItemStack; public class CreativeTabFrames extends CreativeTabs { public CreativeTabFrames() { @@ -13,7 +13,7 @@ public CreativeTabFrames() { @Nonnull @Override - public Item getTabIconItem() { - return Validate.notNull(Item.getItemFromBlock(FunkyLocomotion.pusher)); + public ItemStack getTabIconItem() { + return new ItemStack(Validate.notNull(Item.getItemFromBlock(FunkyLocomotion.pusher))); } } diff --git a/src/main/java/com/rwtema/funkylocomotion/EntityMovingEventHandler.java b/src/main/java/com/rwtema/funkylocomotion/EntityMovingEventHandler.java index fcca43b..a3a6db6 100644 --- a/src/main/java/com/rwtema/funkylocomotion/EntityMovingEventHandler.java +++ b/src/main/java/com/rwtema/funkylocomotion/EntityMovingEventHandler.java @@ -1,18 +1,16 @@ package com.rwtema.funkylocomotion; +import java.util.List; +import java.util.WeakHashMap; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.Vec3d; import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; import net.minecraftforge.fml.relauncher.Side; -import java.util.List; -import java.util.WeakHashMap; - public class EntityMovingEventHandler { public static final WeakHashMap client = new WeakHashMap<>(); public static final WeakHashMap server = new WeakHashMap<>(); @@ -48,7 +46,7 @@ public static void moveEntity(Entity entity, double dx, double dy, double dz) { boolean flag = entity.onGround && entity.isSneaking() && entity instanceof EntityPlayer; if (flag) { - for (double d6 = 0.05D; dx != 0.0D && entity.worldObj.getCollisionBoxes(entity, entity.getEntityBoundingBox().offset(dx, -1.0D, 0.0D)).isEmpty(); xspeed = dx) { + for ( ; dx != 0.0D && entity.getEntityWorld().getCollisionBoxes(entity, entity.getEntityBoundingBox().offset(dx, -1.0D, 0.0D)).isEmpty(); xspeed = dx) { if (dx < 0.05D && dx >= -0.05D) { dx = 0.0D; } else if (dx > 0.0D) { @@ -58,7 +56,7 @@ public static void moveEntity(Entity entity, double dx, double dy, double dz) { } } - for (; dz != 0.0D && entity.worldObj.getCollisionBoxes(entity, entity.getEntityBoundingBox().offset(0.0D, -1.0D, dz)).isEmpty(); zpeed = dz) { + for (; dz != 0.0D && entity.getEntityWorld().getCollisionBoxes(entity, entity.getEntityBoundingBox().offset(0.0D, -1.0D, dz)).isEmpty(); zpeed = dz) { if (dz < 0.05D && dz >= -0.05D) { dz = 0.0D; } else if (dz > 0.0D) { @@ -68,7 +66,7 @@ public static void moveEntity(Entity entity, double dx, double dy, double dz) { } } - for (; dx != 0.0D && dz != 0.0D && entity.worldObj.getCollisionBoxes(entity, entity.getEntityBoundingBox().offset(dx, -1.0D, dz)).isEmpty(); zpeed = dz) { + for (; dx != 0.0D && dz != 0.0D && entity.getEntityWorld().getCollisionBoxes(entity, entity.getEntityBoundingBox().offset(dx, -1.0D, dz)).isEmpty(); zpeed = dz) { if (dx < 0.05D && dx >= -0.05D) { dx = 0.0D; } else if (dx > 0.0D) { @@ -89,7 +87,7 @@ public static void moveEntity(Entity entity, double dx, double dy, double dz) { } } - List list1 = entity.worldObj.getCollisionBoxes(entity, entity.getEntityBoundingBox().addCoord(dx, dy, dz)); + List list1 = entity.getEntityWorld().getCollisionBoxes(entity, entity.getEntityBoundingBox().addCoord(dx, dy, dz)); AxisAlignedBB axisalignedbb = entity.getEntityBoundingBox(); int i = 0; @@ -121,7 +119,7 @@ public static void moveEntity(Entity entity, double dx, double dy, double dz) { AxisAlignedBB axisalignedbb1 = entity.getEntityBoundingBox(); entity.setEntityBoundingBox(axisalignedbb); dy = (double) entity.stepHeight; - List list = entity.worldObj.getCollisionBoxes(entity, entity.getEntityBoundingBox().addCoord(xspeed, dy, zpeed)); + List list = entity.getEntityWorld().getCollisionBoxes(entity, entity.getEntityBoundingBox().addCoord(xspeed, dy, zpeed)); AxisAlignedBB axisalignedbb2 = entity.getEntityBoundingBox(); AxisAlignedBB axisalignedbb3 = axisalignedbb2.addCoord(xspeed, 0.0D, zpeed); double d9 = dy; diff --git a/src/main/java/com/rwtema/funkylocomotion/FunkyLocomotion.java b/src/main/java/com/rwtema/funkylocomotion/FunkyLocomotion.java index 7eced1b..4184c72 100644 --- a/src/main/java/com/rwtema/funkylocomotion/FunkyLocomotion.java +++ b/src/main/java/com/rwtema/funkylocomotion/FunkyLocomotion.java @@ -28,7 +28,8 @@ import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.registry.GameRegistry; -@Mod(modid = FunkyLocomotion.MODID, version = FunkyLocomotion.VERSION, dependencies = "after:ThermalExpansion;after:ThermalFoundation;required-after:Forge@[10.13.1.1217,)") +@Mod(modid = FunkyLocomotion.MODID, version = FunkyLocomotion.VERSION) + //dependencies = "after:ThermalExpansion;after:ThermalFoundation;required-after:Forge@[10.13.1.1217,)") public class FunkyLocomotion { public static final String MODID = "funkylocomotion"; public static final String VERSION = "1.0"; @@ -92,12 +93,12 @@ public void preinit(FMLPreInitializationEvent event) { GameRegistry.register(wrench = WrenchFactory.makeMeAWrench()); - GameRegistry.registerTileEntity(TileMovingServer.class, "funkylocomotion:tileMover"); - GameRegistry.registerTileEntity(TilePusher.class, "funkylocomotion:tilePusher"); - GameRegistry.registerTileEntity(TileSlider.class, "funkylocomotion:tileSlider"); - GameRegistry.registerTileEntity(TileBooster.class, "funkylocomotion:tileBooster"); - GameRegistry.registerTileEntity(TileTeleport.class, "funkylocomotion:tileTeleporter"); - GameRegistry.registerTileEntity(TileFrameProjector.class, "funkylocomotion:tileFrameProjector"); + GameRegistry.registerTileEntity(TileMovingServer.class, "funkylocomotion:tile_mover"); + GameRegistry.registerTileEntity(TilePusher.class, "funkylocomotion:tile_pusher"); + GameRegistry.registerTileEntity(TileSlider.class, "funkylocomotion:tile_slider"); + GameRegistry.registerTileEntity(TileBooster.class, "funkylocomotion:tile_booster"); + GameRegistry.registerTileEntity(TileTeleport.class, "funkylocomotion:tile_teleporter"); + GameRegistry.registerTileEntity(TileFrameProjector.class, "funkylocomotion:tile_frame_projector"); proxy.registerRendering(); diff --git a/src/main/java/com/rwtema/funkylocomotion/ProxyClient.java b/src/main/java/com/rwtema/funkylocomotion/ProxyClient.java index 51aa9bd..47f9b3e 100644 --- a/src/main/java/com/rwtema/funkylocomotion/ProxyClient.java +++ b/src/main/java/com/rwtema/funkylocomotion/ProxyClient.java @@ -109,7 +109,7 @@ private void registerBlockItemModel(Block block) { @Override public World getClientWorld() { - return Minecraft.getMinecraft().theWorld; + return Minecraft.getMinecraft().world; } @Override diff --git a/src/main/java/com/rwtema/funkylocomotion/api/FunkyCapabilities.java b/src/main/java/com/rwtema/funkylocomotion/api/FunkyCapabilities.java index 8f5cc79..ccb648c 100644 --- a/src/main/java/com/rwtema/funkylocomotion/api/FunkyCapabilities.java +++ b/src/main/java/com/rwtema/funkylocomotion/api/FunkyCapabilities.java @@ -26,7 +26,7 @@ public class FunkyCapabilities { public static Capability ADV_STICKY_BLOCK = null; @CapabilityInject(IItemHandler.class) - public static void initializeCapabilities(Capability ignore) { + public static void initializeCapabilities(Capability ignore) { register(IMoveCheck.class, () -> (worldObj, pos, profile) -> EnumActionResult.PASS); register(IStickyBlock.class, () -> (world, pos, side) -> false); register(ISlipperyBlock.class, () -> (world, pos, dir) -> false); diff --git a/src/main/java/com/rwtema/funkylocomotion/api/IAdvStickyBlock.java b/src/main/java/com/rwtema/funkylocomotion/api/IAdvStickyBlock.java index c47c9b8..6124276 100644 --- a/src/main/java/com/rwtema/funkylocomotion/api/IAdvStickyBlock.java +++ b/src/main/java/com/rwtema/funkylocomotion/api/IAdvStickyBlock.java @@ -3,8 +3,6 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import java.util.List; - public interface IAdvStickyBlock { Iterable getBlocksToMove(World world, BlockPos pos); } diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockBooster.java b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockBooster.java index e1ecf68..615c0ab 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockBooster.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockBooster.java @@ -1,5 +1,6 @@ package com.rwtema.funkylocomotion.blocks; +import javax.annotation.Nonnull; import com.rwtema.funkylocomotion.FunkyLocomotion; import com.rwtema.funkylocomotion.helper.ItemHelper; import com.rwtema.funkylocomotion.movers.IMover; @@ -18,9 +19,6 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - public class BlockBooster extends Block { public BlockBooster() { super(Material.ROCK); @@ -31,7 +29,8 @@ public BlockBooster() { } @Override - public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) { + public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, + EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) { if (!worldIn.isRemote) { ItemStack item = playerIn.getHeldItem(hand); if (!(ItemHelper.isWrench(item))) @@ -44,14 +43,16 @@ public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, side = face.getOpposite(); worldIn.setBlockState(pos, state.withProperty(BlockDirectional.FACING, side), 3); + return true; } - return true; + return false; } @Nonnull @Override - public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { - IBlockState state = super.onBlockPlaced(worldIn, pos, facing, hitX, hitY, hitZ, meta, placer); + public IBlockState getStateForPlacement(World worldIn, BlockPos pos, EnumFacing facing, + float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, EnumHand hand) { + IBlockState state = super.getStateForPlacement(worldIn, pos, facing, hitX, hitY, hitZ, meta, placer, hand); EnumFacing opposite = facing.getOpposite(); if (worldIn.getTileEntity(pos.offset(opposite)) instanceof IMover) { return state.withProperty(BlockDirectional.FACING, opposite); diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockFLMultiState.java b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockFLMultiState.java index 64ce34c..6e9e504 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockFLMultiState.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockFLMultiState.java @@ -1,13 +1,12 @@ package com.rwtema.funkylocomotion.blocks; +import javax.annotation.Nonnull; import net.minecraft.block.Block; import net.minecraft.block.material.MapColor; import net.minecraft.block.material.Material; import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; -import javax.annotation.Nonnull; - public abstract class BlockFLMultiState extends Block { public BlockFLMultiState(Material blockMaterialIn, MapColor blockMapColorIn) { super(blockMaterialIn, blockMapColorIn); @@ -24,7 +23,6 @@ public BlockFLMultiState(Material materialIn) { @Override public abstract int getMetaFromState(IBlockState state); - @SuppressWarnings("NullableProblems") @Override public abstract IBlockState getStateFromMeta(int meta); } diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockFrame.java b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockFrame.java index e1ad102..44b6b28 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockFrame.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockFrame.java @@ -1,5 +1,6 @@ package com.rwtema.funkylocomotion.blocks; +import javax.annotation.Nonnull; import com.rwtema.funkylocomotion.api.IStickyBlock; import net.minecraft.block.Block; import net.minecraft.block.material.Material; @@ -9,8 +10,6 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import javax.annotation.Nonnull; - public class BlockFrame extends Block implements IStickyBlock { public BlockFrame() { super(Material.ROCK); @@ -18,9 +17,11 @@ public BlockFrame() { this.setHardness(1); } + @SuppressWarnings("deprecation") @Override public boolean shouldSideBeRendered(IBlockState blockState, @Nonnull IBlockAccess blockAccess, @Nonnull BlockPos pos, EnumFacing side) { - return super.shouldSideBeRendered(blockState, blockAccess, pos, side) && !(blockAccess.getBlockState(pos.offset(side)).getBlock() instanceof BlockFrame); + return super.shouldSideBeRendered(blockState, blockAccess, pos, side) && + !(blockAccess.getBlockState(pos.offset(side)).getBlock() instanceof BlockFrame); } @Override @@ -44,7 +45,7 @@ public boolean isFullyOpaque(IBlockState state) { } @Override - public boolean isVisuallyOpaque() { + public boolean causesSuffocation(IBlockState state) { return false; } diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockFrameProjector.java b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockFrameProjector.java index acef111..97583eb 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockFrameProjector.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockFrameProjector.java @@ -1,11 +1,11 @@ package com.rwtema.funkylocomotion.blocks; +import javax.annotation.Nonnull; import com.rwtema.funkylocomotion.FunkyLocomotion; import com.rwtema.funkylocomotion.helper.BlockHelper; import com.rwtema.funkylocomotion.helper.ItemHelper; import net.minecraft.block.Block; import net.minecraft.block.BlockDirectional; -import net.minecraft.block.BlockPistonBase; import net.minecraft.block.material.Material; import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; @@ -19,9 +19,6 @@ import net.minecraft.world.World; import net.minecraft.world.WorldServer; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - public class BlockFrameProjector extends BlockFLMultiState { public BlockFrameProjector() { @@ -61,8 +58,9 @@ public TileEntity createTileEntity(@Nonnull World world, @Nonnull IBlockState st @Nonnull @Override - public IBlockState getStateForPlacement(@Nonnull World world, @Nonnull BlockPos pos, @Nonnull EnumFacing facing, float hitX, float hitY, float hitZ, int meta, @Nonnull EntityLivingBase placer, ItemStack stack) { - EnumFacing facingFromEntity = BlockPistonBase.getFacingFromEntity(pos, placer); + public IBlockState getStateForPlacement(@Nonnull World world, @Nonnull BlockPos pos, @Nonnull EnumFacing facing, + float hitX, float hitY, float hitZ, int meta, @Nonnull EntityLivingBase placer, EnumHand hand) { + EnumFacing facingFromEntity = EnumFacing.getDirectionFromEntityLiving(pos, placer); return getDefaultState().withProperty(BlockDirectional.FACING, facingFromEntity); } @@ -75,7 +73,8 @@ public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, Enti } @Override - public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) { + public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, + EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) { if (!worldIn.isRemote) { ItemStack item = playerIn.getHeldItem(hand); if (!(ItemHelper.isWrench(item))) @@ -90,6 +89,7 @@ public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, projector.range = 1; } BlockHelper.markBlockForUpdate(worldIn, pos); + return true; } } else { IBlockState blockState = worldIn.getBlockState(pos); @@ -105,13 +105,14 @@ public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, projector.facing = side; BlockHelper.markBlockForUpdate(worldIn, pos); } + return true; } } - return true; + return false; } @Override - public void neighborChanged(IBlockState state, World world, BlockPos pos, Block blockIn) { + public void neighborChanged(IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos) { TileEntity tile = world.getTileEntity(pos); if (!(tile instanceof TileFrameProjector)) return; diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockMoving.java b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockMoving.java index 117c635..4ecfb28 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockMoving.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockMoving.java @@ -1,5 +1,9 @@ package com.rwtema.funkylocomotion.blocks; +import java.util.List; +import java.util.Random; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import com.rwtema.funkylocomotion.fakes.FakeWorldClient; import net.minecraft.block.Block; import net.minecraft.block.material.Material; @@ -20,11 +24,6 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import java.util.List; -import java.util.Random; - public class BlockMoving extends Block { public static BlockMoving instance; private final AxisAlignedBB ZERO_BOUNDS = new AxisAlignedBB(0, 0, 0, 0, 0, 0); @@ -36,13 +35,13 @@ public BlockMoving() { instance = this; } - @SuppressWarnings("unused") public static boolean _Immoveable() { return true; } @Override - public void addCollisionBoxToList(IBlockState state, @Nonnull World worldIn, @Nonnull BlockPos pos, @Nonnull AxisAlignedBB entityBox, @Nonnull List collidingBoxes, @Nullable Entity entityIn) { + public void addCollisionBoxToList(IBlockState state, @Nonnull World worldIn, @Nonnull BlockPos pos, @Nonnull AxisAlignedBB entityBox, + @Nonnull List collidingBoxes, @Nullable Entity entityIn, boolean p_185477_7_) { TileEntity tile = worldIn.getTileEntity(pos); if (!(tile instanceof TileMovingBase)) return; @@ -65,7 +64,7 @@ public void addCollisionBoxToList(IBlockState state, @Nonnull World worldIn, @No @Nullable @Override - public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, @Nonnull World worldIn, @Nonnull BlockPos pos) { + public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, @Nonnull IBlockAccess worldIn, @Nonnull BlockPos pos) { return getBounds(worldIn, pos, false, false); } @@ -93,7 +92,7 @@ public TileEntity createTileEntity(@Nonnull World world, @Nonnull IBlockState st } @Override - public boolean isVisuallyOpaque() { + public boolean causesSuffocation(IBlockState state) { return false; } @@ -112,11 +111,10 @@ public boolean isNormalCube(IBlockState state, IBlockAccess world, BlockPos pos) return false; } - @SuppressWarnings("ConstantConditions") @Nonnull @Override public ItemStack getPickBlock(@Nonnull IBlockState state, RayTraceResult target, @Nonnull World world, @Nonnull BlockPos pos, EntityPlayer player) { - return null; + return ItemStack.EMPTY; } @Nonnull @@ -161,16 +159,18 @@ public int getLightOpacity(IBlockState state, IBlockAccess world, BlockPos pos) } @Override - public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) { + public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, + EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) { if (worldIn.isRemote) - return true; + return false; TileEntity tile = worldIn.getTileEntity(pos); if (tile instanceof TileMovingServer) { ((TileMovingServer) tile).cacheActivate(playerIn, side, hand, hitX, hitY, hitZ); + return true; } - return true; + return false; } @Override @@ -184,6 +184,7 @@ public void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos, fakeWorld.offset = mover.offset(true); fakeWorld.dir_id = mover.dir; fakeWorld.dir = mover.getDir(); + @SuppressWarnings("deprecation") IBlockState state = mover.block.getStateFromMeta(mover.meta); mover.block.randomDisplayTick(state, fakeWorld, pos, rand); fakeWorld.offset = 0; diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockPusher.java b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockPusher.java index a9eeecd..a39e09f 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockPusher.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockPusher.java @@ -1,10 +1,12 @@ package com.rwtema.funkylocomotion.blocks; +import javax.annotation.Nonnull; import com.rwtema.funkylocomotion.FunkyLocomotion; import com.rwtema.funkylocomotion.api.ISlipperyBlock; import com.rwtema.funkylocomotion.helper.ItemHelper; import net.minecraft.block.Block; import net.minecraft.block.BlockDirectional; +import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyEnum; import net.minecraft.block.state.BlockStateContainer; @@ -18,15 +20,12 @@ import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.minecraft.util.IStringSerializable; +import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraft.world.WorldServer; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import java.util.List; - public class BlockPusher extends BlockFLMultiState implements ISlipperyBlock { public static final PropertyEnum PUSH_PULL_TYPE = PropertyEnum.create("push_pull", PushPullType.class); @@ -34,13 +33,15 @@ public BlockPusher() { super(Material.ROCK); this.setCreativeTab(FunkyLocomotion.creativeTabFrames); this.setHardness(1); + this.setSoundType(SoundType.STONE); } @Nonnull @Override - public IBlockState getStateForPlacement(@Nonnull World world, @Nonnull BlockPos pos, @Nonnull EnumFacing facing, float hitX, float hitY, float hitZ, int meta, @Nonnull EntityLivingBase placer, ItemStack stack) { - return super.getStateForPlacement(world, pos, facing, hitX, hitY, hitZ, meta, placer, stack) - .withProperty(BlockDirectional.FACING, EnumFacing.UP); + public IBlockState getStateForPlacement(@Nonnull World world, @Nonnull BlockPos pos, @Nonnull EnumFacing facing, + float hitX, float hitY, float hitZ, int meta, @Nonnull EntityLivingBase placer, EnumHand hand) { + IBlockState state = super.getStateForPlacement(world, pos, facing, hitX, hitY, hitZ, meta, placer, hand); + return state.withProperty(BlockDirectional.FACING, facing.getOpposite()); } @Override @@ -56,13 +57,19 @@ public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, Enti } @Override - public void getSubBlocks(@Nonnull Item itemIn, CreativeTabs tab, List list) { + public int damageDropped(IBlockState state) { + return state.getValue(PUSH_PULL_TYPE) == PushPullType.PUSHER ? 0 : 1; + } + + @Override + public void getSubBlocks(@Nonnull Item itemIn, CreativeTabs tab, NonNullList list) { list.add(new ItemStack(itemIn, 1, 0)); list.add(new ItemStack(itemIn, 1, 1)); } @Override - public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) { + public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, + EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) { if (!worldIn.isRemote) { ItemStack item = playerIn.getHeldItem(hand); if (!(ItemHelper.isWrench(item))) @@ -75,8 +82,9 @@ public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, side = face.getOpposite(); worldIn.setBlockState(pos, state.withProperty(BlockDirectional.FACING, side), 3); + return true; } - return true; + return false; } @Override @@ -85,7 +93,7 @@ public boolean canStickTo(World world, BlockPos pos, EnumFacing dir) { } @Override - public void neighborChanged(IBlockState state, World world, BlockPos pos, Block blockIn) { + public void neighborChanged(IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos) { TileEntity tile = world.getTileEntity(pos); if (!(tile instanceof TilePusher)) return; diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockSlider.java b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockSlider.java index 122132f..f47e2e7 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockSlider.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockSlider.java @@ -1,5 +1,6 @@ package com.rwtema.funkylocomotion.blocks; +import javax.annotation.Nonnull; import com.rwtema.funkylocomotion.helper.BlockHelper; import com.rwtema.funkylocomotion.helper.ItemHelper; import net.minecraft.block.BlockDirectional; @@ -13,14 +14,11 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; +import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import java.util.List; - public class BlockSlider extends BlockPusher { public static final PropertyInteger SUB_ROTATION = PropertyInteger.create("sub_rot", 0, 3); @@ -35,7 +33,7 @@ public BlockSlider() { } @Override - public void getSubBlocks(@Nonnull Item itemIn, CreativeTabs tab, List list) { + public void getSubBlocks(@Nonnull Item itemIn, CreativeTabs tab, NonNullList list) { list.add(new ItemStack(itemIn, 1, 0)); } @@ -50,15 +48,20 @@ public void init() { }; } + @Override + public int damageDropped(IBlockState state) { + return 0; + } + @Nonnull @Override public IBlockState getActualState(@Nonnull IBlockState state, IBlockAccess worldIn, BlockPos pos) { if (state.getBlock() != this) return state; EnumFacing facing = state.getValue(BlockDirectional.FACING); - TileEntity tile = worldIn.getTileEntity(pos); - if (tile instanceof TileSlider) { - EnumFacing slideDir = ((TileSlider) tile).getSlideDir(); + TileSlider tile = BlockHelper.getTileEntitySafely(worldIn, pos, TileSlider.class); + if (tile != null) { + EnumFacing slideDir = tile.getSlideDir(); init(); int value = map[facing.ordinal()][slideDir.ordinal()]; @@ -70,9 +73,10 @@ public IBlockState getActualState(@Nonnull IBlockState state, IBlockAccess world } @Override - public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) { + public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, + EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) { if (worldIn.isRemote) { - return true; + return false; } ItemStack item = playerIn.getHeldItem(hand); if (!(ItemHelper.isWrench(item))) @@ -84,6 +88,7 @@ public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, if (tile != null && tile.getClass() == TileSlider.class) { ((TileSlider) tile).rotateAboutAxis(); BlockHelper.markBlockForUpdate(worldIn, pos); + return true; } } else { if (side.ordinal() == meta) @@ -95,8 +100,9 @@ public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, ((TileSlider) tile).getSlideDir(); BlockHelper.markBlockForUpdate(worldIn, pos); } + return true; } - return true; + return false; } @Nonnull diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockStickyFrame.java b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockStickyFrame.java index 99fc7c1..b75be85 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockStickyFrame.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockStickyFrame.java @@ -1,5 +1,8 @@ package com.rwtema.funkylocomotion.blocks; +import java.util.EnumMap; +import javax.annotation.Nonnull; +import org.apache.commons.lang3.Validate; import com.google.common.collect.ImmutableList; import com.rwtema.funkylocomotion.FunkyLocomotion; import com.rwtema.funkylocomotion.helper.ItemHelper; @@ -14,14 +17,9 @@ import net.minecraft.util.BlockRenderLayer; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; +import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import org.apache.commons.lang3.Validate; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import java.util.EnumMap; -import java.util.List; public class BlockStickyFrame extends BlockFrame { public static final BlockStickyFrame[] blocks = new BlockStickyFrame[4]; @@ -113,8 +111,10 @@ public int getMetaFromState(IBlockState state) { return getRawMeta(state) & 15; } + @SuppressWarnings("deprecation") @Override - public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) { + public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, + EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) { ItemStack item = playerIn.getHeldItem(hand); if (!(ItemHelper.isWrench(item))) return false; @@ -160,7 +160,7 @@ public ImmutableList getValidStates() { } @Override - public void getSubBlocks(@Nonnull Item itemIn, CreativeTabs tab, List list) { + public void getSubBlocks(@Nonnull Item itemIn, CreativeTabs tab, NonNullList list) { if (index == 0) { list.add(new ItemStack(itemIn)); } diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockTeleport.java b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockTeleport.java index e94734a..f732c9f 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockTeleport.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockTeleport.java @@ -1,5 +1,8 @@ package com.rwtema.funkylocomotion.blocks; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import org.apache.commons.lang3.Validate; import com.rwtema.funkylocomotion.items.ItemBlockTeleporter; import net.minecraft.block.BlockDirectional; import net.minecraft.block.state.BlockStateContainer; @@ -12,13 +15,9 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; +import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import org.apache.commons.lang3.Validate; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import java.util.List; public class BlockTeleport extends BlockPusher { public BlockTeleport() { @@ -28,7 +27,12 @@ public BlockTeleport() { } @Override - public void getSubBlocks(@Nonnull Item itemIn, CreativeTabs tab, List list) { + public int damageDropped(IBlockState state) { + return 0; + } + + @Override + public void getSubBlocks(@Nonnull Item itemIn, CreativeTabs tab, NonNullList list) { list.add(new ItemStack(itemIn, 1, 0)); } @@ -41,8 +45,9 @@ public TileEntity createTileEntity(@Nonnull World world, @Nonnull IBlockState st @Nullable @Override public ItemStack getItem(World worldIn, BlockPos pos, @Nonnull IBlockState state) { + @SuppressWarnings("deprecation") ItemStack item = super.getItem(worldIn, pos, state); - if (item != null) { + if (item.isEmpty() == false) { TileEntity tileEntity = worldIn.getTileEntity(pos); if (tileEntity instanceof TileTeleport) { int teleportId = ((TileTeleport) tileEntity).teleportId; @@ -57,8 +62,9 @@ public ItemStack getItem(World worldIn, BlockPos pos, @Nonnull IBlockState state return item; } - - public void harvestBlock(@Nonnull World worldIn, EntityPlayer player, @Nonnull BlockPos pos, @Nonnull IBlockState state, @Nullable TileEntity te, @Nullable ItemStack stack) { + @Override + public void harvestBlock(@Nonnull World worldIn, EntityPlayer player, @Nonnull BlockPos pos, @Nonnull IBlockState state, + @Nullable TileEntity te, @Nonnull ItemStack stack) { if (te instanceof TileTeleport) { ItemStack itemstack = new ItemStack(this, 1); int teleportId = ((TileTeleport) te).teleportId; diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/TileMovingBase.java b/src/main/java/com/rwtema/funkylocomotion/blocks/TileMovingBase.java index 9a62a23..5247519 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/TileMovingBase.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/TileMovingBase.java @@ -41,7 +41,6 @@ public TileMovingBase(Side side) { this.side = side; } - @SuppressWarnings("unused") public static boolean _Immovable() { return true; } @@ -113,8 +112,10 @@ public void readFromNBT(NBTTagCompound tag) { @Nonnull public NBTTagCompound writeToNBT(NBTTagCompound tag) { super.writeToNBT(tag); - tag.setTag("BlockTag", block); - tag.setTag("DescTag", desc); + if (block != null) + tag.setTag("BlockTag", block); + if (desc != null) + tag.setTag("DescTag", desc); tag.setInteger("Time", time); tag.setInteger("MaxTime", maxTime); tag.setByte("Dir", (byte) dir); @@ -149,13 +150,12 @@ public Vec3d getMovVec() { return new Vec3d(dir.getFrontOffsetX() * d, dir.getFrontOffsetY() * d, dir.getFrontOffsetZ() * d); } - @SuppressWarnings("unchecked") @Override public void update() { if (maxTime == 0) return; - if (worldObj.isRemote) { + if (getWorld().isRemote) { time = time + 1 - 1; } @@ -166,7 +166,7 @@ public void update() { time++; for (AxisAlignedBB bb : getTransformedColisions()) { - List entities = worldObj.getEntitiesWithinAABB(Entity.class, bb.expand(0, 0.1, 0)); + List entities = getWorld().getEntitiesWithinAABB(Entity.class, bb.expand(0, 0.1, 0)); for (Entity entity : entities) { entityList.add(entity); } @@ -209,7 +209,7 @@ public AxisAlignedBB getCombinedCollisions(boolean renderOffset, boolean shrink) EnumFacing dir = this.getDir(); if (dir != null) { - TileEntity other = worldObj.getTileEntity(pos.offset(dir)); + TileEntity other = getWorld().getTileEntity(pos.offset(dir)); if (other instanceof TileMovingBase) { AxisAlignedBB[] bbs1 = ((TileMovingBase) other).collisions; for (AxisAlignedBB bb1 : bbs1) { diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/TileMovingClient.java b/src/main/java/com/rwtema/funkylocomotion/blocks/TileMovingClient.java index 3f15079..54bdbbb 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/TileMovingClient.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/TileMovingClient.java @@ -1,8 +1,11 @@ package com.rwtema.funkylocomotion.blocks; +import java.lang.ref.WeakReference; +import java.util.HashMap; +import java.util.HashSet; +import javax.annotation.Nonnull; import com.rwtema.funkylocomotion.description.Describer; import com.rwtema.funkylocomotion.fakes.FakeWorldClient; -import com.rwtema.funkylocomotion.helper.BlockHelper; import com.rwtema.funkylocomotion.rendering.ChunkRerenderer; import com.rwtema.funkylocomotion.rendering.PassHandler; import net.minecraft.block.Block; @@ -18,15 +21,10 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import javax.annotation.Nonnull; -import java.lang.ref.WeakReference; -import java.util.HashMap; -import java.util.HashSet; - public class TileMovingClient extends TileMovingBase { public static final HashMap> cachedTiles = new HashMap<>(); - public static final HashSet renderBlackList = new HashSet<>(); - public static final HashSet renderErrorList = new HashSet<>(); + public static final HashSet> renderBlackList = new HashSet<>(); + public static final HashSet> renderErrorList = new HashSet<>(); public final boolean[] skipPass = new boolean[2]; public Block block = Blocks.AIR; public int meta = 0; @@ -86,10 +84,10 @@ public void handleUpdateTag(NBTTagCompound tag) { // tile = ref.get(); } - if (tile != null && FakeWorldClient.isValid(worldObj) && tile.getWorld() == this.worldObj) { + if (tile != null && FakeWorldClient.isValid(getWorld()) && tile.getWorld() == this.getWorld()) { rawTile = true; tile.setPos(pos.toImmutable()); - tile.setWorldObj(FakeWorldClient.getFakeWorldWrapper(this.worldObj)); + tile.setWorld(FakeWorldClient.getFakeWorldWrapper(this.getWorld())); tile.updateContainingBlockInfo(); this.tile = tile; render = true; @@ -97,7 +95,7 @@ public void handleUpdateTag(NBTTagCompound tag) { render = !tag.getBoolean("DNR"); if (render) { - this.tile = Describer.recreateTileEntity(tag, getState(), pos, FakeWorldClient.getFakeWorldWrapper(this.worldObj)); + this.tile = Describer.recreateTileEntity(tag, getState(), pos, FakeWorldClient.getFakeWorldWrapper(this.getWorld())); } } @@ -110,7 +108,7 @@ public void handleUpdateTag(NBTTagCompound tag) { init = true; - worldObj.markBlockRangeForRenderUpdate(pos, pos); + getWorld().markBlockRangeForRenderUpdate(pos, pos); } public boolean checkClass(Object o) { @@ -138,7 +136,7 @@ public AxisAlignedBB getRenderBoundingBox() { if (tile != null) other = tile.getRenderBoundingBox(); else - other = getState().getCollisionBoundingBox(FakeWorldClient.getFakeWorldWrapper(worldObj), pos); + other = getState().getCollisionBoundingBox(FakeWorldClient.getFakeWorldWrapper(getWorld()), pos); if (other == null) other = Block.FULL_BLOCK_AABB; @@ -162,7 +160,7 @@ public boolean shouldRenderInPass(int pass) { IBlockState state = getState(); - if (block == Blocks.AIR || (tile == null && block.getRenderType(state) == EnumBlockRenderType.INVISIBLE)) + if (block == Blocks.AIR || (tile == null && state.getRenderType() == EnumBlockRenderType.INVISIBLE)) return false; if (tile != null) { @@ -179,6 +177,7 @@ public boolean shouldRenderInPass(int pass) { return false; } + @SuppressWarnings("deprecation") public IBlockState getState() { return block.getStateFromMeta(meta); } diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/TileMovingServer.java b/src/main/java/com/rwtema/funkylocomotion/blocks/TileMovingServer.java index 2fc65e4..8d26b6e 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/TileMovingServer.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/TileMovingServer.java @@ -1,5 +1,7 @@ package com.rwtema.funkylocomotion.blocks; +import java.lang.ref.WeakReference; +import javax.annotation.Nonnull; import com.rwtema.funkylocomotion.movers.MoverEventHandler; import com.rwtema.funkylocomotion.movers.MovingTileRegistry; import net.minecraft.entity.player.EntityPlayer; @@ -8,9 +10,6 @@ import net.minecraft.util.EnumHand; import net.minecraftforge.fml.relauncher.Side; -import javax.annotation.Nonnull; -import java.lang.ref.WeakReference; - public class TileMovingServer extends TileMovingBase { public WeakReference activatingPlayer = null; @@ -26,25 +25,23 @@ public TileMovingServer() { @Override @Nonnull public NBTTagCompound getUpdateTag() { - if (desc == null) + if (this.desc == null) return super.getUpdateTag(); - super.writeToNBT(desc); - - desc.setInteger("Time", time); - desc.setInteger("MaxTime", maxTime); - desc.setByte("Dir", (byte) dir); + this.desc.setInteger("Time", this.time); + this.desc.setInteger("MaxTime", this.maxTime); + this.desc.setByte("Dir", (byte) this.dir); - if (lightLevel > 0) - desc.setByte("Light", (byte) lightLevel); - if (lightOpacity > 0) - desc.setShort("Opacity", (short) lightOpacity); - - if (collisions.length > 0) { - desc.setTag("Collisions", TagsAxis(collisions)); - } + if (this.block != null) + this.desc.setTag("BlockTag", this.block); + if (this.collisions.length > 0) + this.desc.setTag("Collisions", TagsAxis(this.collisions)); + if (this.lightLevel != 0) + this.desc.setByte("Light", (byte) this.lightLevel); + if (this.lightOpacity != 0) + this.desc.setShort("Opacity", (short) this.lightOpacity); - return desc; + return this.desc; } @Override @@ -69,7 +66,7 @@ public void validate() { public void update() { if (time < maxTime) { super.update(); - this.worldObj.markChunkDirty(pos, this); + this.getWorld().markChunkDirty(pos, this); } else { MoverEventHandler.registerFinisher(); // MoveManager.finishMoving(); diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/TilePusher.java b/src/main/java/com/rwtema/funkylocomotion/blocks/TilePusher.java index a6349b5..691b434 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/TilePusher.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/TilePusher.java @@ -1,5 +1,13 @@ package com.rwtema.funkylocomotion.blocks; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.UUID; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import org.apache.commons.lang3.StringUtils; import com.mojang.authlib.GameProfile; import com.rwtema.funkylocomotion.FunkyLocomotion; import com.rwtema.funkylocomotion.api.FunkyCapabilities; @@ -22,11 +30,6 @@ import net.minecraft.world.World; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.energy.CapabilityEnergy; -import org.apache.commons.lang3.StringUtils; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import java.util.*; public class TilePusher extends TilePowered implements IMover, ITickable { public static final int[] moveTime = new int[]{ @@ -202,7 +205,7 @@ public void startMoving() { EnumFacing dir = d2.getOpposite(); boolean push = meta < 6; - List posList = getBlocks(worldObj, pos, dir, push); + List posList = getBlocks(getWorld(), pos, dir, push); if (posList != null) { final int energy = posList.size() * powerPerTile; if (this.energy.extractEnergy(energy, true) != energy) @@ -212,12 +215,12 @@ public void startMoving() { for (EnumFacing d : EnumFacing.values()) { if (d != dir) { BlockPos p = pos.offset(d); - IBlockState state = worldObj.getBlockState(p); + IBlockState state = getWorld().getBlockState(p); if (state.getBlock() == FunkyLocomotion.booster) { if (state.getValue(BlockDirectional.FACING) != d.getOpposite()) continue; - TileEntity tile = BlockHelper.getTile(worldObj, p); + TileEntity tile = BlockHelper.getTile(getWorld(), p); if (tile instanceof TileBooster) { TileBooster booster = (TileBooster) tile; if (booster.energy.extractEnergy(energy, true) != energy) @@ -237,13 +240,13 @@ public void startMoving() { this.energy.extractEnergy(energy, false); - MoveManager.startMoving(worldObj, posList, getDirection(), moveTime[boosters.size()]); + MoveManager.startMoving(getWorld(), posList, getDirection(), moveTime[boosters.size()]); } } @Override public boolean stillExists() { - return !tileEntityInvalid && worldObj != null && worldObj.isBlockLoaded(pos) && worldObj.getTileEntity(pos) == this; + return !tileEntityInvalid && getWorld() != null && getWorld().isBlockLoaded(pos) && getWorld().getTileEntity(pos) == this; } @Override @@ -274,8 +277,10 @@ public T getCapability(@Nonnull Capability capability, @Nonnull EnumFacin @Override public void update() { - if (cooldown > 0) { - cooldown--; + if (! this.getWorld().isRemote) { + if (cooldown > 0) { + cooldown--; + } if (cooldown == 0) { MoverEventHandler.registerMover(this); } diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/TileSlider.java b/src/main/java/com/rwtema/funkylocomotion/blocks/TileSlider.java index 5c13ea7..aea5a14 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/TileSlider.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/TileSlider.java @@ -97,7 +97,7 @@ public NBTTagCompound getUpdateTag() { @Override public void handleUpdateTag(@Nonnull NBTTagCompound tag) { slideDir = EnumFacing.values()[tag.getByte("dir")]; - worldObj.markBlockRangeForRenderUpdate(pos, pos); + getWorld().markBlockRangeForRenderUpdate(pos, pos); } diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/TileTeleport.java b/src/main/java/com/rwtema/funkylocomotion/blocks/TileTeleport.java index 0c7ff40..2400492 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/TileTeleport.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/TileTeleport.java @@ -1,12 +1,16 @@ package com.rwtema.funkylocomotion.blocks; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import com.rwtema.funkylocomotion.FunkyLocomotion; import com.rwtema.funkylocomotion.helper.BlockHelper; import com.rwtema.funkylocomotion.helper.WeakSet; import com.rwtema.funkylocomotion.movers.MoveManager; -import com.rwtema.funkylocomotion.network.FLNetwork; import com.rwtema.funkylocomotion.particles.ObstructionHelper; -import gnu.trove.map.hash.TLongObjectHashMap; import net.minecraft.block.BlockDirectional; import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTTagCompound; @@ -17,13 +21,7 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; +import gnu.trove.map.hash.TLongObjectHashMap; public class TileTeleport extends TilePusher { static TLongObjectHashMap> cache = new TLongObjectHashMap<>(); @@ -43,7 +41,7 @@ public List checkPositions(World srcWorld, EnumFacing moveDir, ArrayLi TileTeleport tile = getTileTeleport(); if (tile == null) return null; - World dstWorld = tile.worldObj; + World dstWorld = tile.getWorld(); boolean fail = false; for (BlockPos pos : posList) { @@ -73,7 +71,7 @@ private TileTeleport getTileTeleport() { if (tile.isInvalid()) iterator.remove(); - if (tile == this || !tile.hasWorldObj()) + if (tile == this || !tile.hasWorld()) continue; World world = tile.getWorld(); @@ -116,11 +114,11 @@ public void startMoving() { if (dir == null) return; - List posList = getBlocks(worldObj, pos, dir, push); + List posList = getBlocks(getWorld(), pos, dir, push); if (posList != null) { final int energy = posList.size() * powerPerTile; if (this.energy.extractEnergy(energy, true) != energy) { - ObstructionHelper.sendObstructionPacket(worldObj, this.pos, null); + ObstructionHelper.sendObstructionPacket(getWorld(), this.pos, null); return; } @@ -131,12 +129,12 @@ public void startMoving() { for (EnumFacing d : EnumFacing.values()) { if (d != dir) { BlockPos p = pos.offset(d); - IBlockState state = worldObj.getBlockState(p); + IBlockState state = getWorld().getBlockState(p); if (state.getBlock() == FunkyLocomotion.booster) { if (state.getValue(BlockDirectional.FACING) != d.getOpposite()) continue; - TileEntity tile = BlockHelper.getTile(worldObj, p); + TileEntity tile = BlockHelper.getTile(getWorld(), p); if (tile instanceof TileBooster) { TileBooster booster = (TileBooster) tile; if (booster.energy.extractEnergy(energy, true) != energy) @@ -162,7 +160,7 @@ public void startMoving() { links.add(new MoveManager.BlockLink(blockPos, getDestinationPos(tileTeleport, blockPos))); } - MoveManager.startMoving(worldObj, tileTeleport.worldObj, links, null, moveTime[boosters.size()] * 2); + MoveManager.startMoving(getWorld(), tileTeleport.getWorld(), links, null, moveTime[boosters.size()] * 2); } } @@ -180,7 +178,7 @@ public void onChunkUnload() { } private void unCache() { - if (teleportId != 0 && (worldObj == null || !worldObj.isRemote)) { + if (teleportId != 0 && (getWorld() == null || !getWorld().isRemote)) { WeakSet tileTeleports = cache.get(teleportId); if (tileTeleports != null) { tileTeleports.remove(this); @@ -191,7 +189,7 @@ private void unCache() { @Override public void validate() { super.validate(); - if (teleportId != 0 && (worldObj == null || !worldObj.isRemote)) { + if (teleportId != 0 && (getWorld() == null || !getWorld().isRemote)) { WeakSet tileTeleports = cache.get(teleportId); if (tileTeleports == null) { diff --git a/src/main/java/com/rwtema/funkylocomotion/compat/CompatHandler.java b/src/main/java/com/rwtema/funkylocomotion/compat/CompatHandler.java index d22aa57..eb069be 100644 --- a/src/main/java/com/rwtema/funkylocomotion/compat/CompatHandler.java +++ b/src/main/java/com/rwtema/funkylocomotion/compat/CompatHandler.java @@ -33,6 +33,7 @@ public static void initCompat(ASMDataTable asmData) { if (flag) { try { + @SuppressWarnings("unchecked") Class name = (Class) Class.forName(data.getClassName()); CompatHandler compatHandler = name.newInstance(); compatHandler.init(); diff --git a/src/main/java/com/rwtema/funkylocomotion/debug/DebugEventHandler.java b/src/main/java/com/rwtema/funkylocomotion/debug/DebugEventHandler.java index da0d884..51d83c8 100644 --- a/src/main/java/com/rwtema/funkylocomotion/debug/DebugEventHandler.java +++ b/src/main/java/com/rwtema/funkylocomotion/debug/DebugEventHandler.java @@ -16,9 +16,8 @@ public class DebugEventHandler { @SubscribeEvent @SideOnly(Side.CLIENT) - @SuppressWarnings("unchecked") public void renderTiles(TickEvent.WorldTickEvent event) { - WorldClient clientWorld = Minecraft.getMinecraft().theWorld; + WorldClient clientWorld = Minecraft.getMinecraft().world; if (event.world == null || clientWorld == null) return; diff --git a/src/main/java/com/rwtema/funkylocomotion/description/Describer.java b/src/main/java/com/rwtema/funkylocomotion/description/Describer.java index 01c745e..bef78e0 100644 --- a/src/main/java/com/rwtema/funkylocomotion/description/Describer.java +++ b/src/main/java/com/rwtema/funkylocomotion/description/Describer.java @@ -35,7 +35,7 @@ public static TileEntity recreateTileEntity(NBTTagCompound tag, IBlockState stat fakeWorldWrapper.blockstateOverides.put(pos, state); fakeWorldWrapper.tileOverides.put(pos, tile); - tile.setWorldObj(fakeWorldWrapper); + tile.setWorld(fakeWorldWrapper); tile.setPos(pos); tile.updateContainingBlockInfo(); diff --git a/src/main/java/com/rwtema/funkylocomotion/fakes/FakeWorldClient.java b/src/main/java/com/rwtema/funkylocomotion/fakes/FakeWorldClient.java index 06b205d..25cb24b 100644 --- a/src/main/java/com/rwtema/funkylocomotion/fakes/FakeWorldClient.java +++ b/src/main/java/com/rwtema/funkylocomotion/fakes/FakeWorldClient.java @@ -70,7 +70,7 @@ private FakeWorldClient(World world) { new WorldSettings(world.getWorldInfo()), world.provider.getDimension(), world.getDifficulty(), - world.theProfiler); + world.profiler); this.world = world; this.worldClient = world instanceof WorldClient ? ((WorldClient) world) : null; @@ -223,7 +223,7 @@ public boolean isSideSolid(BlockPos pos, @Nonnull EnumFacing side, boolean _defa } @Override - public boolean spawnEntityInWorld(@Nonnull Entity entity) { + public boolean spawnEntity(@Nonnull Entity entity) { return false; } diff --git a/src/main/java/com/rwtema/funkylocomotion/helper/BlockHelper.java b/src/main/java/com/rwtema/funkylocomotion/helper/BlockHelper.java index aaabc3a..39de9ae 100644 --- a/src/main/java/com/rwtema/funkylocomotion/helper/BlockHelper.java +++ b/src/main/java/com/rwtema/funkylocomotion/helper/BlockHelper.java @@ -1,5 +1,8 @@ package com.rwtema.funkylocomotion.helper; +import java.lang.invoke.MethodHandle; +import java.lang.reflect.Field; +import javax.annotation.Nullable; import com.mojang.authlib.GameProfile; import com.rwtema.funkylocomotion.api.FunkyCapabilities; import com.rwtema.funkylocomotion.api.IMoveCheck; @@ -13,14 +16,22 @@ import net.minecraft.util.EnumActionResult; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; +import net.minecraft.world.ChunkCache; import net.minecraft.world.EnumSkyBlock; +import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraft.world.chunk.Chunk; import net.minecraft.world.chunk.storage.ExtendedBlockStorage; - -import javax.annotation.Nullable; +import net.minecraftforge.fml.relauncher.ReflectionHelper; public class BlockHelper { + private static final MethodHandle methodHandle_Chunk_relightBlock = + MethodHandleUtils.getMethodHandleVirtual(Chunk.class, new String[] { "func_76615_h", "relightBlock" }, int.class, int.class, int.class); + private static final MethodHandle methodHandle_Chunk_propagateSkylightOcclusion = + MethodHandleUtils.getMethodHandleVirtual(Chunk.class, new String[] { "func_76595_e", "propagateSkylightOcclusion" }, int.class, int.class); + private static final Field field_Chunk_precipitationHeightMap = ReflectionHelper.findField(Chunk.class, "field_76638_b", "precipitationHeightMap"); + + @SuppressWarnings("deprecation") public static boolean silentSetBlock(Chunk chunk, BlockPos pos, Block block, int meta) { int dx = pos.getX() & 15; int dz = pos.getZ() & 15; @@ -28,8 +39,18 @@ public static boolean silentSetBlock(Chunk chunk, BlockPos pos, Block block, int int i1 = dz << 4 | dx; - if (y >= chunk.precipitationHeightMap[i1] - 1) { - chunk.precipitationHeightMap[i1] = -999; + try + { + int[] precMap = (int[]) field_Chunk_precipitationHeightMap.get(chunk); + if (y >= precMap[i1] - 1) { + precMap[i1] = -999; + } + //if (y >= chunk.precipitationHeightMap[i1] - 1) { + // chunk.precipitationHeightMap[i1] = -999; + //} + } + catch (Exception e) + { } IBlockState state1 = chunk.getBlockState(dx, y, dz); @@ -46,11 +67,11 @@ public static boolean silentSetBlock(Chunk chunk, BlockPos pos, Block block, int return false; } - extendedblockstorage = chunk.getBlockStorageArray()[y >> 4] = new ExtendedBlockStorage(y >> 4 << 4, !chunk.worldObj.provider.getHasNoSky()); + extendedblockstorage = chunk.getBlockStorageArray()[y >> 4] = new ExtendedBlockStorage(y >> 4 << 4, !chunk.getWorld().provider.hasNoSky()); } extendedblockstorage.set(dx, y & 15, dz, block.getStateFromMeta(meta)); - chunk.isModified = true; + chunk.setModified(true); return true; } @@ -66,11 +87,21 @@ public static void postUpdateBlock(World world, BlockPos pos) { Chunk chunk = world.getChunkFromBlockCoords(pos); - if (pos.getY() >= chunk.precipitationHeightMap[i1] - 1) { - chunk.precipitationHeightMap[i1] = -999; + try + { + int[] precMap = (int[]) field_Chunk_precipitationHeightMap.get(chunk); + if (pos.getY() >= precMap[i1] - 1) { + precMap[i1] = -999; + } + //if (pos.getY() >= chunk.precipitationHeightMap[i1] - 1) { + // chunk.precipitationHeightMap[i1] = -999; + //} + } + catch (Exception e) + { } - int j1 = chunk.heightMap[i1]; + int j1 = chunk.getHeightMap()[i1]; boolean flag = pos.getY() >= j1; IBlockState newState = chunk.getBlockState(pos.getX() & 15, pos.getY(), pos.getZ() & 15); Block newBlock = newState.getBlock(); @@ -81,18 +112,26 @@ public static void postUpdateBlock(World world, BlockPos pos) { } else { int j2 = newBlock.getLightOpacity(newState, world, pos); + try + { if (j2 > 0) { if (pos.getY() >= j1) { - chunk.relightBlock(pos.getX() & 15, pos.getY() + 1, pos.getZ() & 15); + methodHandle_Chunk_relightBlock.invokeExact(chunk, pos.getX() & 15, pos.getY() + 1, pos.getZ() & 15); + //chunk.relightBlock(pos.getX() & 15, pos.getY() + 1, pos.getZ() & 15); } } else if (pos.getY() == j1 - 1) { - - chunk.relightBlock(pos.getX() & 15, pos.getY(), pos.getZ() & 15); + methodHandle_Chunk_relightBlock.invokeExact(chunk, pos.getX() & 15, pos.getY(), pos.getZ() & 15); + //chunk.relightBlock(pos.getX() & 15, pos.getY(), pos.getZ() & 15); } if (j2 != k2 && (j2 < k2 || chunk.getLightFor(EnumSkyBlock.SKY, pos) > 0 || chunk.getLightFor(EnumSkyBlock.BLOCK, pos) > 0)) { - chunk.propagateSkylightOcclusion(pos.getX() & 15, pos.getZ() & 15); + methodHandle_Chunk_propagateSkylightOcclusion.invokeExact(chunk, pos.getX() & 15, pos.getZ() & 15); + //chunk.propagateSkylightOcclusion(pos.getX() & 15, pos.getZ() & 15); + } + } + catch (Throwable t) + { } } @@ -100,9 +139,13 @@ public static void postUpdateBlock(World world, BlockPos pos) { markBlockForUpdate(world, pos); if (!world.isRemote) { - world.notifyBlockOfStateChange(pos, Blocks.AIR); - world.notifyBlockOfStateChange(pos, newBlock); - world.notifyNeighborsOfStateChange(pos, newBlock); + // TODO: Is this correct in 1.11? + world.neighborChanged(pos, Blocks.AIR, pos); + world.neighborChanged(pos, newBlock, pos); + // It used to be this in 1.10: + //world.notifyBlockOfStateChange(pos, Blocks.AIR); + //world.notifyBlockOfStateChange(pos, newBlock); + world.notifyNeighborsOfStateChange(pos, newBlock, false); if (newState.hasComparatorInputOverride()) { world.updateComparatorOutputLevel(pos, newBlock); @@ -181,4 +224,24 @@ public static void markBlockForUpdate(World world, BlockPos pos) { IBlockState state = world.getBlockState(pos); world.notifyBlockUpdate(pos, state, state, 0); } + + @Nullable + public static T getTileEntitySafely(IBlockAccess world, BlockPos pos, Class tileClass) { + TileEntity te; + + if (world instanceof ChunkCache) { + ChunkCache chunkCache = (ChunkCache) world; + te = chunkCache.getTileEntity(pos, Chunk.EnumCreateEntityType.CHECK); + } + else { + te = world.getTileEntity(pos); + } + + if (tileClass.isInstance(te)) { + return tileClass.cast(te); + } + else { + return null; + } + } } diff --git a/src/main/java/com/rwtema/funkylocomotion/helper/ItemHelper.java b/src/main/java/com/rwtema/funkylocomotion/helper/ItemHelper.java index 2543b63..5b55c29 100644 --- a/src/main/java/com/rwtema/funkylocomotion/helper/ItemHelper.java +++ b/src/main/java/com/rwtema/funkylocomotion/helper/ItemHelper.java @@ -32,7 +32,7 @@ public class ItemHelper { public static boolean isWrench(ItemStack item) { - if (item == null || item.getItem() == null) + if (item.isEmpty()) return false; if (item.getItem() == Items.STICK || item.getItem() == FunkyLocomotion.wrench) diff --git a/src/main/java/com/rwtema/funkylocomotion/helper/MethodHandleUtils.java b/src/main/java/com/rwtema/funkylocomotion/helper/MethodHandleUtils.java new file mode 100644 index 0000000..1321b0b --- /dev/null +++ b/src/main/java/com/rwtema/funkylocomotion/helper/MethodHandleUtils.java @@ -0,0 +1,59 @@ +package com.rwtema.funkylocomotion.helper; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.MethodHandles; +import java.lang.reflect.Method; +import net.minecraftforge.fml.relauncher.ReflectionHelper.UnableToFindMethodException; + +public class MethodHandleUtils +{ + public static class UnableToFindMethodHandleException extends RuntimeException + { + private static final long serialVersionUID = 1L; + + public UnableToFindMethodHandleException(String[] methodNames, Exception failed) + { + super(failed); + } + } + + public static MethodHandle getMethodHandleVirtual(Class clazz, String[] methodNames, Class... paramTypes) + { + Exception failed = null; + + try + { + Method method = reflectMethod(clazz, methodNames, paramTypes); + MethodHandle handle = MethodHandles.lookup().unreflect(method); + method.setAccessible(false); + return handle; + } + catch (IllegalAccessException e) + { + failed = e; + } + + throw new UnableToFindMethodHandleException(methodNames, failed); + } + + public static Method reflectMethod(Class clazz, String[] methodNames, Class... methodTypes) + { + Exception failed = null; + + for (String methodName : methodNames) + { + try + { + Method m = clazz.getDeclaredMethod(methodName, methodTypes); + m.setAccessible(true); + return m; + } + catch (Exception e) + { + failed = e; + } + } + + throw new UnableToFindMethodException(methodNames, failed); + } +} diff --git a/src/main/java/com/rwtema/funkylocomotion/helper/WeakSet.java b/src/main/java/com/rwtema/funkylocomotion/helper/WeakSet.java index 44c8d57..c65246d 100644 --- a/src/main/java/com/rwtema/funkylocomotion/helper/WeakSet.java +++ b/src/main/java/com/rwtema/funkylocomotion/helper/WeakSet.java @@ -14,7 +14,6 @@ public boolean add(E e) { return !map.containsKey(e) && map.put(e, BLANK) == null; } - @SuppressWarnings("NullableProblems") @Override public Iterator iterator() { return map.keySet().iterator(); @@ -30,7 +29,6 @@ public boolean isEmpty() { return map.isEmpty(); } - @SuppressWarnings("SuspiciousMethodCalls") @Override public boolean contains(Object o) { return map.containsKey(o); diff --git a/src/main/java/com/rwtema/funkylocomotion/items/ItemBlockFrame.java b/src/main/java/com/rwtema/funkylocomotion/items/ItemBlockFrame.java index 49599cc..077f9a4 100644 --- a/src/main/java/com/rwtema/funkylocomotion/items/ItemBlockFrame.java +++ b/src/main/java/com/rwtema/funkylocomotion/items/ItemBlockFrame.java @@ -1,17 +1,16 @@ package com.rwtema.funkylocomotion.items; +import java.util.List; +import javax.annotation.Nonnull; import com.rwtema.funkylocomotion.blocks.BlockStickyFrame; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; +import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import net.minecraft.util.text.translation.I18n; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import javax.annotation.Nonnull; -import java.util.List; - public class ItemBlockFrame extends ItemBlockMetadata { public final int index; @@ -23,6 +22,7 @@ public ItemBlockFrame(Block block) { index = ((BlockStickyFrame) block).getRawIndex(); } + @SuppressWarnings("deprecation") @Nonnull @Override public String getItemStackDisplayName(@Nonnull ItemStack itemstack) { @@ -36,31 +36,30 @@ public String getItemStackDisplayName(@Nonnull ItemStack itemstack) { int meta = itemstack.getItemDamage() + index; for (int i = 0; i < 6; i++) if (((meta) & (1 << i)) != 0) - builder.append(I18n.translateToLocal("frame.dir.abbreviations." + i)); + builder.append(net.minecraft.util.text.translation.I18n.translateToLocal("frame.dir.abbreviations." + i)); builder.append(")"); return builder.toString(); } - @SuppressWarnings("unchecked") @Override @SideOnly(Side.CLIENT) - public void addInformation(@Nonnull ItemStack item, @Nonnull EntityPlayer player, @Nonnull List list, boolean debug) { + public void addInformation(@Nonnull ItemStack item, @Nonnull EntityPlayer player, @Nonnull List list, boolean debug) { super.addInformation(item, player, list, debug); if (index == 0 && item.getItemDamage() == 0) return; - list.add(I18n.translateToLocal("frame.dir.start")); + list.add(I18n.format("frame.dir.start")); String s = ""; boolean flag = false; for (int i = 0; i < 6; i++) { if (((index + item.getItemDamage()) & (1 << i)) != 0) { if (flag) s = s + ", "; - s = s + I18n.translateToLocal("frame.dir.name." + i); + s = s + I18n.format("frame.dir.name." + i); flag = true; } } - list.addAll(Minecraft.getMinecraft().fontRendererObj.listFormattedStringToWidth(s, 60)); + list.addAll(Minecraft.getMinecraft().fontRenderer.listFormattedStringToWidth(s, 60)); } } diff --git a/src/main/java/com/rwtema/funkylocomotion/items/ItemBlockTeleporter.java b/src/main/java/com/rwtema/funkylocomotion/items/ItemBlockTeleporter.java index 461be0c..101c387 100644 --- a/src/main/java/com/rwtema/funkylocomotion/items/ItemBlockTeleporter.java +++ b/src/main/java/com/rwtema/funkylocomotion/items/ItemBlockTeleporter.java @@ -1,7 +1,11 @@ package com.rwtema.funkylocomotion.items; +import java.util.List; +import java.util.Random; +import javax.annotation.Nonnull; import com.rwtema.funkylocomotion.rendering.WordDictionary; import net.minecraft.block.Block; +import net.minecraft.client.resources.I18n; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; @@ -12,17 +16,13 @@ import net.minecraft.util.EnumActionResult; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; +import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.util.text.TextComponentTranslation; -import net.minecraft.util.text.translation.I18n; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import javax.annotation.Nonnull; -import java.util.List; -import java.util.Random; - public class ItemBlockTeleporter extends ItemBlock { public static final String NBT_TELEPORTER_ID = "TeleportID"; @@ -57,36 +57,35 @@ public void onUpdate(ItemStack item, World world, Entity entity, int slot, boole } } - @SuppressWarnings("unchecked") @Override - public void getSubItems(@Nonnull Item item, @Nonnull CreativeTabs tab, @Nonnull List list) { + public void getSubItems(@Nonnull Item item, @Nonnull CreativeTabs tab, NonNullList list) { list.add((new ItemStack(item, 1, 0))); } @Nonnull @Override - public EnumActionResult onItemUse(ItemStack stack, @Nonnull EntityPlayer playerIn, World worldIn, @Nonnull BlockPos pos, EnumHand hand, @Nonnull EnumFacing facing, float hitX, float hitY, float hitZ) { + public EnumActionResult onItemUse(@Nonnull EntityPlayer playerIn, World worldIn, @Nonnull BlockPos pos, EnumHand hand, @Nonnull EnumFacing facing, float hitX, float hitY, float hitZ) { + ItemStack stack = playerIn.getHeldItem(hand); NBTTagCompound tag = stack.getTagCompound(); if (tag == null || tag.getInteger(NBT_TELEPORTER_ID) == 0) { if (worldIn.isRemote) { - playerIn.addChatComponentMessage(new TextComponentTranslation("frame.teleport.no_id.0")); - playerIn.addChatComponentMessage(new TextComponentTranslation("frame.teleport.no_id.1")); + playerIn.sendMessage(new TextComponentTranslation("frame.teleport.no_id.0")); + playerIn.sendMessage(new TextComponentTranslation("frame.teleport.no_id.1")); } return EnumActionResult.FAIL; } - return super.onItemUse(stack, playerIn, worldIn, pos, hand, facing, hitX, hitY, hitZ); + return super.onItemUse(playerIn, worldIn, pos, hand, facing, hitX, hitY, hitZ); } - @SuppressWarnings("unchecked") @Override @SideOnly(Side.CLIENT) - public void addInformation(@Nonnull ItemStack item, @Nonnull EntityPlayer player, @Nonnull List list, boolean debug) { + public void addInformation(@Nonnull ItemStack item, @Nonnull EntityPlayer player, @Nonnull List list, boolean debug) { super.addInformation(item, player, list, debug); NBTTagCompound tagCompound = item.getTagCompound(); if (tagCompound == null || !tagCompound.hasKey(NBT_TELEPORTER_ID)) { - list.add(I18n.translateToLocal("frame.teleport.no_id.0")); - list.add(I18n.translateToLocal("frame.teleport.no_id.1")); + list.add(I18n.format("frame.teleport.no_id.0")); + list.add(I18n.format("frame.teleport.no_id.1")); return; } @@ -98,7 +97,7 @@ public void addInformation(@Nonnull ItemStack item, @Nonnull EntityPlayer player id = id & (0xFFFFF); - StringBuilder builder = new StringBuilder().append(I18n.translateToLocal("frame.teleport.id")).append(": ").append('"'); + StringBuilder builder = new StringBuilder().append(I18n.format("frame.teleport.id")).append(": ").append('"'); String[] words = WordDictionary.getWords(); diff --git a/src/main/java/com/rwtema/funkylocomotion/items/ItemWrench.java b/src/main/java/com/rwtema/funkylocomotion/items/ItemWrench.java index c46569a..dfc2436 100644 --- a/src/main/java/com/rwtema/funkylocomotion/items/ItemWrench.java +++ b/src/main/java/com/rwtema/funkylocomotion/items/ItemWrench.java @@ -1,11 +1,14 @@ package com.rwtema.funkylocomotion.items; +import java.util.List; +import javax.annotation.Nonnull; import com.rwtema.funkylocomotion.FunkyLocomotion; import com.rwtema.funkylocomotion.blocks.BlockStickyFrame; import com.rwtema.funkylocomotion.movers.IMover; import com.rwtema.funkylocomotion.movers.MoverEventHandler; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; +import net.minecraft.client.resources.I18n; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; @@ -14,9 +17,9 @@ import net.minecraft.util.EnumActionResult; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; +import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3d; -import net.minecraft.util.text.translation.I18n; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; @@ -25,9 +28,6 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import javax.annotation.Nonnull; -import java.util.List; - public class ItemWrench extends Item { public static final int metaWrenchNormal = 0; public static final int metaWrenchEye = 1; @@ -45,10 +45,9 @@ public ItemWrench() { MinecraftForge.EVENT_BUS.register(this); } - @SuppressWarnings("unchecked") @Override @SideOnly(Side.CLIENT) - public void getSubItems(@Nonnull Item item, CreativeTabs tab, List list) { + public void getSubItems(@Nonnull Item item, CreativeTabs tab, NonNullList list) { list.add(new ItemStack(item, 1, 0)); list.add(new ItemStack(item, 1, 1)); list.add(new ItemStack(item, 1, 2)); @@ -62,14 +61,15 @@ public boolean doesSneakBypassUse(ItemStack stack, IBlockAccess world, BlockPos @Override public void addInformation(ItemStack stack, EntityPlayer playerIn, List tooltip, boolean advanced) { if (stack.getItemDamage() == metaWrenchEye) - tooltip.add(I18n.translateToLocal("tooltip.funkylocomotion:wrench_eye")); + tooltip.add(I18n.format("tooltip.funkylocomotion:wrench_eye")); else if (stack.getItemDamage() == metaWrenchHammer) - tooltip.add(I18n.translateToLocal("tooltip.funkylocomotion:wrench_hammer")); + tooltip.add(I18n.format("tooltip.funkylocomotion:wrench_hammer")); } @Nonnull @Override - public EnumActionResult onItemUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, EnumHand hand) { + public EnumActionResult onItemUseFirst(EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, EnumHand hand) { + ItemStack stack = player.getHeldItem(hand); if (stack.getItemDamage() != metaWrenchHammer) return EnumActionResult.PASS; @@ -89,14 +89,14 @@ public EnumActionResult onItemUseFirst(ItemStack stack, EntityPlayer player, Wor return EnumActionResult.PASS; if (block instanceof BlockStickyFrame) { - state = block.getActualState(state, world, pos); + state = state.getActualState(world, pos); boolean isOpen = state.getValue(BlockStickyFrame.DIR_OPEN_MAP.get(side)); Block otherBlock; for (BlockPos.MutableBlockPos otherPos : BlockPos.getAllInBoxMutable(pos.offset(d1, -2).offset(d2, -2), pos.offset(d1, 2).offset(d2, 2))) { if (otherPos.equals(pos)) { - block.onBlockActivated(world, pos, state, player, hand, player.getHeldItem(hand), side, hitX, hitY, hitZ); + block.onBlockActivated(world, pos, state, player, hand, side, hitX, hitY, hitZ); } else { IBlockState otherBlockState = world.getBlockState(otherPos); otherBlock = otherBlockState.getBlock(); @@ -105,7 +105,7 @@ public EnumActionResult onItemUseFirst(ItemStack stack, EntityPlayer player, Wor if (isInaccessible(world, side, hitX, hitY, hitZ, blockingPos)) continue; - otherBlock.onBlockActivated(world, otherPos, otherBlockState, player, hand, player.getHeldItem(hand), side, hitX, hitY, hitZ); + otherBlock.onBlockActivated(world, otherPos, otherBlockState, player, hand, side, hitX, hitY, hitZ); } } } @@ -121,7 +121,7 @@ public EnumActionResult onItemUseFirst(ItemStack stack, EntityPlayer player, Wor BlockPos blockingPos = otherPos.offset(side.getOpposite()); if (!pos.equals(otherPos) && isInaccessible(world, side, hitX, hitY, hitZ, blockingPos)) continue; - otherBlock.onBlockActivated(world, otherPos, otherBlockState, player, hand, player.getHeldItem(hand), side, hitX, hitY, hitZ); + otherBlock.onBlockActivated(world, otherPos, otherBlockState, player, hand, side, hitX, hitY, hitZ); } } @@ -134,7 +134,7 @@ private boolean isInaccessible(World world, EnumFacing side, float hitX, float h if (!blockingBlock.isAir(blockingState, world, blockingPos)) { if (blockingState.getCollisionBoundingBox(world, blockingPos) != null && blockingBlock.canCollideCheck(blockingState, false)) { int face = side.ordinal(); - if (blockingBlock.collisionRayTrace(blockingState, world, blockingPos, + if (blockingState.collisionRayTrace(world, blockingPos, new Vec3d( blockingPos.getX() + (face == 4 ? -0.1 : face == 5 ? 1.1 : hitX), blockingPos.getY() + (face == 0 ? -0.1 : face == 1 ? 1.1 : hitY), @@ -156,8 +156,8 @@ private boolean isInaccessible(World world, EnumFacing side, float hitX, float h @Override public boolean onBlockStartBreak(ItemStack itemstack, BlockPos pos, EntityPlayer player) { - if (!player.worldObj.isRemote) { - TileEntity tileEntity = player.worldObj.getTileEntity(pos); + if (!player.getEntityWorld().isRemote) { + TileEntity tileEntity = player.getEntityWorld().getTileEntity(pos); if (tileEntity instanceof IMover) { MoverEventHandler.registerMover((IMover) tileEntity); } @@ -179,7 +179,7 @@ else if (itemstack.getItemDamage() == metaWrenchHammer) @SubscribeEvent public void leftClick(PlayerInteractEvent.LeftClickBlock event) { ItemStack heldItem = event.getEntityPlayer().getHeldItem(event.getHand()); - if (heldItem == null || heldItem.getItem() != this) + if (heldItem.isEmpty() || heldItem.getItem() != this) return; if (!event.getWorld().isRemote) { TileEntity tileEntity = event.getWorld().getTileEntity(event.getPos()); diff --git a/src/main/java/com/rwtema/funkylocomotion/movers/MoveManager.java b/src/main/java/com/rwtema/funkylocomotion/movers/MoveManager.java index 65c9cc3..68d1620 100644 --- a/src/main/java/com/rwtema/funkylocomotion/movers/MoveManager.java +++ b/src/main/java/com/rwtema/funkylocomotion/movers/MoveManager.java @@ -1,5 +1,16 @@ package com.rwtema.funkylocomotion.movers; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import javax.annotation.Nullable; +import org.apache.commons.lang3.Validate; import com.rwtema.funkylocomotion.api.IMoveFactory; import com.rwtema.funkylocomotion.blocks.BlockMoving; import com.rwtema.funkylocomotion.blocks.TileMovingServer; @@ -17,8 +28,8 @@ import net.minecraft.init.Blocks; import net.minecraft.inventory.IInventory; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.Packet; import net.minecraft.network.play.server.SPacketBlockChange; +import net.minecraft.network.play.server.SPacketUpdateTileEntity; import net.minecraft.server.management.PlayerChunkMapEntry; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; @@ -28,10 +39,6 @@ import net.minecraft.world.NextTickListEntry; import net.minecraft.world.World; import net.minecraft.world.chunk.Chunk; -import org.apache.commons.lang3.Validate; - -import javax.annotation.Nullable; -import java.util.*; public class MoveManager { public static final NBTTagCompound airBlockTag; @@ -55,7 +62,6 @@ public static void startMoving(World world, List posList, EnumFacing d startMoving(world, world, links, dir, maxTime); } - @SuppressWarnings("unchecked") public synchronized static void startMoving(World srcWorld, World dstWorld, List links, @Nullable EnumFacing dir, int maxTime) { String section = "Start"; @@ -109,7 +115,7 @@ public synchronized static void startMoving(World srcWorld, World dstWorld, List Set srcChunks = new HashSet<>(); // HashSet srcWatchingPlayers = new HashSet<>(); - HashSet inventories = new HashSet(); + HashSet inventories = new HashSet<>(); vars.put("srcChunks", srcChunks); // vars.put("srcWatchingPlayers", srcWatchingPlayers); @@ -133,7 +139,7 @@ public synchronized static void startMoving(World srcWorld, World dstWorld, List e.lightlevel = state.getLightValue(srcWorld, srcPos); List axes = new ArrayList<>(); - state.addCollisionBoxToList(srcWorld, srcPos, TileEntity.INFINITE_EXTENT_AABB, axes, null); + state.addCollisionBoxToList(srcWorld, srcPos, TileEntity.INFINITE_EXTENT_AABB, axes, null, false); if (axes.size() > 0) { e.bb = new ArrayList<>(); @@ -339,7 +345,7 @@ public synchronized static void startMoving(World srcWorld, World dstWorld, List vars.put("Iterator", tile); PlayerChunkMapEntry watcher = FLNetwork.getChunkWatcher(tile.getWorld(), tile.getPos()); if (watcher != null) { - Packet packet = tile.getUpdatePacket(); + SPacketUpdateTileEntity packet = tile.getUpdatePacket(); vars.put("Iterator2", packet); if (packet != null) watcher.sendPacket(packet); @@ -454,7 +460,7 @@ public static void finishMoving() { section = "Send Update Packets"; for (Chunk chunk : chunks) { vars.put("chunk", chunk); - chunk.isModified = true; + chunk.setModified(true); FLNetwork.updateChunk(chunk); } vars.put("chunk", BLANK); @@ -473,7 +479,6 @@ public static void finishMoving() { state, player, tile.activatingHand, - player.getHeldItem(tile.activatingHand), tile.activatingSide, tile.activatingHitX, tile.activatingHitY, tile.activatingHitZ); } @@ -519,7 +524,9 @@ private static String makeString(Object o, int n) { } } else if (o instanceof Collection) { int i = 0; - Iterator iterator = ((Iterable) o).iterator(); + @SuppressWarnings("unchecked") + Collection c = (Collection) o; + Iterator iterator = c.iterator(); builder.append('\n'); tabs(n, builder); while (iterator.hasNext()) { diff --git a/src/main/java/com/rwtema/funkylocomotion/movers/MoverEventHandler.java b/src/main/java/com/rwtema/funkylocomotion/movers/MoverEventHandler.java index ae5a795..b5fc367 100644 --- a/src/main/java/com/rwtema/funkylocomotion/movers/MoverEventHandler.java +++ b/src/main/java/com/rwtema/funkylocomotion/movers/MoverEventHandler.java @@ -1,7 +1,7 @@ package com.rwtema.funkylocomotion.movers; import com.rwtema.funkylocomotion.helper.WeakSet; -import net.minecraftforge.fml.common.FMLCommonHandler; +import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; @@ -16,7 +16,7 @@ private MoverEventHandler() { } public static void init() { - FMLCommonHandler.instance().bus().register(new MoverEventHandler()); + MinecraftForge.EVENT_BUS.register(new MoverEventHandler()); } public static void registerFinisher() { diff --git a/src/main/java/com/rwtema/funkylocomotion/movers/MovingTileRegistry.java b/src/main/java/com/rwtema/funkylocomotion/movers/MovingTileRegistry.java index 342ce94..06f2730 100644 --- a/src/main/java/com/rwtema/funkylocomotion/movers/MovingTileRegistry.java +++ b/src/main/java/com/rwtema/funkylocomotion/movers/MovingTileRegistry.java @@ -27,7 +27,7 @@ public static List getTilesFinishedMoving() { TileMovingServer tile = iterator.next(); if (tile.isInvalid()) iterator.remove(); - else if (tile.hasWorldObj() && tile.time >= tile.maxTime + else if (tile.hasWorld() && tile.time >= tile.maxTime && tile.getWorld().isBlockLoaded(tile.getPos()) // ensure the tile isn't in mid-chunk-load ) list.add(tile); diff --git a/src/main/java/com/rwtema/funkylocomotion/network/FLNetwork.java b/src/main/java/com/rwtema/funkylocomotion/network/FLNetwork.java index d1a6360..b9cf016 100644 --- a/src/main/java/com/rwtema/funkylocomotion/network/FLNetwork.java +++ b/src/main/java/com/rwtema/funkylocomotion/network/FLNetwork.java @@ -45,13 +45,13 @@ private static PlayerChunkMap getPlayerManager(World world) { } public static void updateChunk(Chunk chunk) { - World world = chunk.worldObj; + World world = chunk.getWorld(); PlayerChunkMapEntry watcher = getChunkWatcher(chunk, world); if (watcher != null) watcher.update(); } public static PlayerChunkMapEntry getChunkWatcher(Chunk chunk) { - return getChunkWatcher(chunk, chunk.worldObj); + return getChunkWatcher(chunk, chunk.getWorld()); } public static PlayerChunkMapEntry getChunkWatcher(Chunk chunk, World world) { diff --git a/src/main/java/com/rwtema/funkylocomotion/network/MessageClearTile.java b/src/main/java/com/rwtema/funkylocomotion/network/MessageClearTile.java index d20034f..2c6ad55 100644 --- a/src/main/java/com/rwtema/funkylocomotion/network/MessageClearTile.java +++ b/src/main/java/com/rwtema/funkylocomotion/network/MessageClearTile.java @@ -69,7 +69,7 @@ public void handlePacket(MessageContext ctx) { clientWorld.loadedTileEntityList.remove(tile); Chunk chunk = clientWorld.getChunkFromBlockCoords(pos); - chunk.chunkTileEntityMap.remove(pos); + chunk.getTileEntityMap().remove(pos); tile.invalidate(); if (!FakeWorldClient.isValid(clientWorld)) return; diff --git a/src/main/java/com/rwtema/funkylocomotion/network/MessageObstruction.java b/src/main/java/com/rwtema/funkylocomotion/network/MessageObstruction.java index 8796c6b..525ed76 100644 --- a/src/main/java/com/rwtema/funkylocomotion/network/MessageObstruction.java +++ b/src/main/java/com/rwtema/funkylocomotion/network/MessageObstruction.java @@ -51,7 +51,7 @@ public void toBytes(ByteBuf buf) { @SideOnly(Side.CLIENT) private void handlePacket(MessageContext ctx) { for (int i = 0; i < 10; i++) - Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleObstruction(Minecraft.getMinecraft().theWorld, x, y, z, side)); + Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleObstruction(Minecraft.getMinecraft().world, x, y, z, side)); } diff --git a/src/main/java/com/rwtema/funkylocomotion/particles/ObstructionHelper.java b/src/main/java/com/rwtema/funkylocomotion/particles/ObstructionHelper.java index 9b3560f..8ca7f16 100644 --- a/src/main/java/com/rwtema/funkylocomotion/particles/ObstructionHelper.java +++ b/src/main/java/com/rwtema/funkylocomotion/particles/ObstructionHelper.java @@ -1,5 +1,7 @@ package com.rwtema.funkylocomotion.particles; +import java.lang.reflect.Field; +import java.util.List; import com.rwtema.funkylocomotion.FunkyLocomotion; import com.rwtema.funkylocomotion.items.ItemWrench; import com.rwtema.funkylocomotion.network.FLNetwork; @@ -13,13 +15,16 @@ import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.ReflectionHelper; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class ObstructionHelper { + private static final Field field_PlayerChunkMapEntry_players = ReflectionHelper.findField(PlayerChunkMapEntry.class, "field_187283_c", "players"); + @SideOnly(Side.CLIENT) public static boolean shouldRenderParticles() { - return playerHoldingWrench(Minecraft.getMinecraft().thePlayer); + return playerHoldingWrench(Minecraft.getMinecraft().player); } private static boolean playerHoldingWrench(EntityPlayer thePlayer) { @@ -27,17 +32,29 @@ private static boolean playerHoldingWrench(EntityPlayer thePlayer) { } private static boolean isEyeWrench(ItemStack heldItem) { - return heldItem != null && + return heldItem.isEmpty() == false && heldItem.getItem() == FunkyLocomotion.wrench && heldItem.getItemDamage() == ItemWrench.metaWrenchEye; } + @SuppressWarnings("unchecked") public static boolean sendObstructionPacket(World world, BlockPos pos, EnumFacing dir) { PlayerChunkMapEntry chunkWatcher = FLNetwork.getChunkWatcher(world, pos); if (chunkWatcher == null) return false; - Packet packet = null; + Packet packet = null; + + List players; + try + { + players = (List) field_PlayerChunkMapEntry_players.get(chunkWatcher); + } + catch (IllegalArgumentException | IllegalAccessException e) + { + return false; + } - for (EntityPlayerMP player : chunkWatcher.players) { + //for (EntityPlayerMP player : chunkWatcher.players) { + for (EntityPlayerMP player : players) { if (playerHoldingWrench(player)) { if (packet == null) packet = FLNetwork.net.getPacketFrom(new MessageObstruction(pos, dir)); player.connection.sendPacket(packet); diff --git a/src/main/java/com/rwtema/funkylocomotion/rendering/PassHandler.java b/src/main/java/com/rwtema/funkylocomotion/rendering/PassHandler.java index 54e04c3..da5b2c1 100644 --- a/src/main/java/com/rwtema/funkylocomotion/rendering/PassHandler.java +++ b/src/main/java/com/rwtema/funkylocomotion/rendering/PassHandler.java @@ -1,11 +1,11 @@ package com.rwtema.funkylocomotion.rendering; -import net.minecraft.util.BlockRenderLayer; -import org.lwjgl.opengl.GL11; - import java.util.Collections; import java.util.EnumSet; import java.util.Set; +import org.lwjgl.opengl.GL11; +import net.minecraft.client.renderer.GlStateManager; +import net.minecraft.util.BlockRenderLayer; public enum PassHandler { @@ -13,8 +13,8 @@ public enum PassHandler { ONE(1, BlockRenderLayer.TRANSLUCENT) { @Override public void setupRendering() { - GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + GlStateManager.enableBlend(); + GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); } }; diff --git a/src/main/java/com/rwtema/funkylocomotion/rendering/TESRMoving.java b/src/main/java/com/rwtema/funkylocomotion/rendering/TESRMoving.java index 6e378e3..48c8e4c 100644 --- a/src/main/java/com/rwtema/funkylocomotion/rendering/TESRMoving.java +++ b/src/main/java/com/rwtema/funkylocomotion/rendering/TESRMoving.java @@ -1,24 +1,29 @@ package com.rwtema.funkylocomotion.rendering; +import org.lwjgl.opengl.GL11; import com.rwtema.funkylocomotion.blocks.TileMovingClient; import com.rwtema.funkylocomotion.fakes.FakeWorldClient; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.multiplayer.WorldClient; -import net.minecraft.client.renderer.*; +import net.minecraft.client.renderer.BlockRendererDispatcher; +import net.minecraft.client.renderer.GlStateManager; +import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.VertexBuffer; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.init.Blocks; +import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockRenderLayer; import net.minecraft.util.EnumBlockRenderType; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.client.MinecraftForgeClient; -import org.lwjgl.opengl.GL11; public class TESRMoving extends TileEntitySpecialRenderer { private BlockRendererDispatcher blockRenderer; @@ -33,7 +38,7 @@ public final void renderTileEntityAt(TileMovingClient te, double x, double y, do RenderHelper.disableStandardItemLighting(); GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GlStateManager.enableBlend(); - GlStateManager.disableCull(); + GlStateManager.enableCull(); if (Minecraft.isAmbientOcclusionEnabled()) { GlStateManager.shadeModel(GL11.GL_SMOOTH); @@ -41,11 +46,9 @@ public final void renderTileEntityAt(TileMovingClient te, double x, double y, do GlStateManager.shadeModel(GL11.GL_FLAT); } - renderTileEntityFast(te, x, y, z, partialTicks, destroyStage, renderer); renderer.setTranslation(0, 0, 0); - RenderHelper.enableStandardItemLighting(); } @@ -53,7 +56,6 @@ public final void renderTileEntityAt(TileMovingClient te, double x, double y, do @Override public void renderTileEntityFast(TileMovingClient te, double x, double y, double z, float partialTicks, int destroyStage, VertexBuffer renderer) { if (blockRenderer == null) blockRenderer = Minecraft.getMinecraft().getBlockRendererDispatcher(); - BlockPos pos1 = te.getPos(); if (!te.init) return; @@ -69,13 +71,13 @@ public void renderTileEntityFast(TileMovingClient te, double x, double y, double if (dir == -1) { return; } -// + this.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); boolean flag = false; int pass = MinecraftForgeClient.getRenderPass(); if (te.render && te.getState().getRenderType() != EnumBlockRenderType.INVISIBLE) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); renderer.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK); setupTranslations(x, y, z, te, h, dir, renderer); flag = renderStatic(te, pass, renderer); @@ -97,8 +99,8 @@ public void renderTileEntityFast(TileMovingClient te, double x, double y, double } tessellator.draw(); - GL11.glPopMatrix(); - GL11.glEnable(GL11.GL_CULL_FACE); + GlStateManager.popMatrix(); + GlStateManager.enableCull(); } flag = flag | renderDynamic(x, y, z, partialTicks, te, h, dir, pass, renderer); @@ -124,22 +126,22 @@ protected boolean renderDynamic(double x, double y, double z, float f, TileMovin } fakeWorldClient.dir_id = mover.dir; - TileEntitySpecialRenderer specialRenderer = TileEntityRendererDispatcher.instance.getSpecialRenderer(mover.tile); + TileEntitySpecialRenderer specialRenderer = TileEntityRendererDispatcher.instance.getSpecialRenderer(mover.tile); if (specialRenderer == null) return false; if (!mover.tile.shouldRenderInPass(pass)) return false; - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); setupTranslations(x, y, z, mover, h, dir, renderer); try { - WorldClient prevWorld1 = Minecraft.getMinecraft().theWorld; - World prevWorld2 = Minecraft.getMinecraft().thePlayer.worldObj; - World prevWorld3 = rendererDispatcher.worldObj; + WorldClient prevWorld1 = Minecraft.getMinecraft().world; + World prevWorld2 = Minecraft.getMinecraft().player.world; + World prevWorld3 = rendererDispatcher.world; try { - Minecraft.getMinecraft().theWorld = fakeWorldClient; - Minecraft.getMinecraft().thePlayer.worldObj = fakeWorldClient; - TileEntityRendererDispatcher.instance.worldObj = fakeWorldClient; + Minecraft.getMinecraft().world = fakeWorldClient; + Minecraft.getMinecraft().player.world = fakeWorldClient; + TileEntityRendererDispatcher.instance.world = fakeWorldClient; renderer.setTranslation(0, 0, 0); mover.tile.updateContainingBlockInfo(); RenderHelper.enableStandardItemLighting(); @@ -147,9 +149,9 @@ protected boolean renderDynamic(double x, double y, double z, float f, TileMovin RenderHelper.disableStandardItemLighting(); renderer.setTranslation(0, 0, 0); } finally { - Minecraft.getMinecraft().theWorld = prevWorld1; - Minecraft.getMinecraft().thePlayer.worldObj = prevWorld2; - TileEntityRendererDispatcher.instance.worldObj = prevWorld3; + Minecraft.getMinecraft().world = prevWorld1; + Minecraft.getMinecraft().player.world = prevWorld2; + TileEntityRendererDispatcher.instance.world = prevWorld3; } } catch (Exception e) { FLRenderHelper.clearTessellator(); @@ -168,7 +170,7 @@ protected boolean renderDynamic(double x, double y, double z, float f, TileMovin mover.render = false; } - GL11.glPopMatrix(); + GlStateManager.popMatrix(); return true; } @@ -177,7 +179,7 @@ private void setupTranslations(double x, double y, double z, TileMovingClient mo if (dir < 6) { EnumFacing dir1 = EnumFacing.values()[dir]; renderer.setTranslation(0, 0, 0); - GL11.glTranslated((x - pos.getX() + dir1.getFrontOffsetX() * h), + GlStateManager.translate((x - pos.getX() + dir1.getFrontOffsetX() * h), (y - pos.getY() + dir1.getFrontOffsetY() * h), (z - pos.getZ() + dir1.getFrontOffsetZ() * h)); // renderer.setTranslation( @@ -186,12 +188,12 @@ private void setupTranslations(double x, double y, double z, TileMovingClient mo // z - pos.getZ() + dir1.getFrontOffsetZ() * h); } else { renderer.setTranslation(0, 0, 0); - GL11.glTranslated(x, y, z); - GL11.glTranslated(0.5, 0.5, 0.5); + GlStateManager.translate(x, y, z); + GlStateManager.translate(0.5, 0.5, 0.5); double dh = dir == 6 ? h + 1 : -h; - GL11.glScaled(dh, dh, dh); - GL11.glTranslated(-0.5, -0.5, -0.5); - GL11.glTranslated(-pos.getX(), -pos.getY(), -pos.getZ()); + GlStateManager.scale(dh, dh, dh); + GlStateManager.translate(-0.5, -0.5, -0.5); + GlStateManager.translate(-pos.getX(), -pos.getY(), -pos.getZ()); } } diff --git a/src/main/resources/META-INF/funkylocomotion_at.cfg b/src/main/resources/META-INF/funkylocomotion_at.cfg index f0245ff..8d0011d 100644 --- a/src/main/resources/META-INF/funkylocomotion_at.cfg +++ b/src/main/resources/META-INF/funkylocomotion_at.cfg @@ -1,10 +1,10 @@ #Main Forge Access Transformer configuration file #Chunk -public net.minecraft.world.chunk.Chunk func_76615_h(III)V -public net.minecraft.world.chunk.Chunk func_76595_e(II)V -public net.minecraft.world.chunk.Chunk * +#public net.minecraft.world.chunk.Chunk func_76615_h(III)V +#public net.minecraft.world.chunk.Chunk func_76595_e(II)V +#public net.minecraft.world.chunk.Chunk * -public net.minecraft.server.management.PlayerChunkMapEntry * +#public net.minecraft.server.management.PlayerChunkMapEntry * #Chunk Watcher #public net.minecraft.server.management.PlayerManager$PlayerInstance @@ -30,62 +30,62 @@ public net.minecraft.server.management.PlayerChunkMapEntry * #GLStateManager -public net.minecraft.client.renderer.GlStateManager * -public net.minecraft.client.renderer.GlStateManager$AlphaState -public net.minecraft.client.renderer.GlStateManager$BlendState -public net.minecraft.client.renderer.GlStateManager$BooleanState -public net.minecraft.client.renderer.GlStateManager$ClearState -public net.minecraft.client.renderer.GlStateManager$Color -public net.minecraft.client.renderer.GlStateManager$ColorLogicState -public net.minecraft.client.renderer.GlStateManager$ColorMask -public net.minecraft.client.renderer.GlStateManager$ColorMaterialState -public net.minecraft.client.renderer.GlStateManager$CullState -public net.minecraft.client.renderer.GlStateManager$DepthState -public net.minecraft.client.renderer.GlStateManager$FogState -public net.minecraft.client.renderer.GlStateManager$PolygonOffsetState -public net.minecraft.client.renderer.GlStateManager$StencilFunc -public net.minecraft.client.renderer.GlStateManager$StencilState -public net.minecraft.client.renderer.GlStateManager$TexGenCoord -public net.minecraft.client.renderer.GlStateManager$TexGenState -public net.minecraft.client.renderer.GlStateManager$TextureState - -public net.minecraft.client.renderer.GlStateManager$AlphaState * -public net.minecraft.client.renderer.GlStateManager$BlendState * -public net.minecraft.client.renderer.GlStateManager$BooleanState * -public net.minecraft.client.renderer.GlStateManager$ClearState * -public net.minecraft.client.renderer.GlStateManager$Color * -public net.minecraft.client.renderer.GlStateManager$ColorLogicState * -public net.minecraft.client.renderer.GlStateManager$ColorMask * -public net.minecraft.client.renderer.GlStateManager$ColorMaterialState * -public net.minecraft.client.renderer.GlStateManager$CullState * -public net.minecraft.client.renderer.GlStateManager$DepthState * -public net.minecraft.client.renderer.GlStateManager$FogState * -public net.minecraft.client.renderer.GlStateManager$PolygonOffsetState * -public net.minecraft.client.renderer.GlStateManager$StencilFunc * -#public net.minecraft.client.renderer.GlStateManager$StenincilState * -public net.minecraft.client.renderer.GlStateManager$TexGenCoord * -public net.minecraft.client.renderer.GlStateManager$TexGenState * -public net.minecraft.client.renderer.GlStateManager$TextureState * +#public net.minecraft.client.renderer.GlStateManager * +#public net.minecraft.client.renderer.GlStateManager$AlphaState +#public net.minecraft.client.renderer.GlStateManager$BlendState +#public net.minecraft.client.renderer.GlStateManager$BooleanState +#public net.minecraft.client.renderer.GlStateManager$ClearState +#public net.minecraft.client.renderer.GlStateManager$Color +#public net.minecraft.client.renderer.GlStateManager$ColorLogicState +#public net.minecraft.client.renderer.GlStateManager$ColorMask +#public net.minecraft.client.renderer.GlStateManager$ColorMaterialState +#public net.minecraft.client.renderer.GlStateManager$CullState +#public net.minecraft.client.renderer.GlStateManager$DepthState +#public net.minecraft.client.renderer.GlStateManager$FogState +#public net.minecraft.client.renderer.GlStateManager$PolygonOffsetState +#public net.minecraft.client.renderer.GlStateManager$StencilFunc +#public net.minecraft.client.renderer.GlStateManager$StencilState +#public net.minecraft.client.renderer.GlStateManager$TexGenCoord +#public net.minecraft.client.renderer.GlStateManager$TexGenState +#public net.minecraft.client.renderer.GlStateManager$TextureState + +#public net.minecraft.client.renderer.GlStateManager$AlphaState * +#public net.minecraft.client.renderer.GlStateManager$BlendState * +#public net.minecraft.client.renderer.GlStateManager$BooleanState * +#public net.minecraft.client.renderer.GlStateManager$ClearState * +#public net.minecraft.client.renderer.GlStateManager$Color * +#public net.minecraft.client.renderer.GlStateManager$ColorLogicState * +#public net.minecraft.client.renderer.GlStateManager$ColorMask * +#public net.minecraft.client.renderer.GlStateManager$ColorMaterialState * +#public net.minecraft.client.renderer.GlStateManager$CullState * +#public net.minecraft.client.renderer.GlStateManager$DepthState * +#public net.minecraft.client.renderer.GlStateManager$FogState * +#public net.minecraft.client.renderer.GlStateManager$PolygonOffsetState * +#public net.minecraft.client.renderer.GlStateManager$StencilFunc * +##public net.minecraft.client.renderer.GlStateManager$StenincilState * +#public net.minecraft.client.renderer.GlStateManager$TexGenCoord * +#public net.minecraft.client.renderer.GlStateManager$TexGenState * +#public net.minecraft.client.renderer.GlStateManager$TextureState * #InventoryCrafting -public net.minecraft.inventory.InventoryCrafting * +#public net.minecraft.inventory.InventoryCrafting * #Minecraft -public net.minecraft.client.Minecraft field_71467_ac +#public net.minecraft.client.Minecraft field_71467_ac #EntityItem -public net.minecraft.entity.item.EntityItem func_70289_a(Lnet/minecraft/entity/item/EntityItem;)Z +#public net.minecraft.entity.item.EntityItem func_70289_a(Lnet/minecraft/entity/item/EntityItem;)Z #TextureAtlasSprite -public net.minecraft.client.renderer.texture.TextureAtlasSprite.field_110982_k -public net.minecraft.client.renderer.texture.TextureAtlasSprite.func_130099_d(I)V -public net.minecraft.client.renderer.texture.TextureAtlasSprite.func_180599_n()V -public net.minecraft.client.renderer.texture.TextureAtlasSprite.func_147962_a([[IIII)[[I +#public net.minecraft.client.renderer.texture.TextureAtlasSprite.field_110982_k +#public net.minecraft.client.renderer.texture.TextureAtlasSprite.func_130099_d(I)V +#public net.minecraft.client.renderer.texture.TextureAtlasSprite.func_180599_n()V +#public net.minecraft.client.renderer.texture.TextureAtlasSprite.func_147962_a([[IIII)[[I #rendering -public net.minecraft.client.renderer.RenderItem func_175035_a(Lnet/minecraft/client/renderer/block/model/IBakedModel;I)V # renderModel -public net.minecraft.client.renderer.RenderItem func_175036_a(Lnet/minecraft/client/renderer/block/model/IBakedModel;Lnet/minecraft/item/ItemStack;)V # renderModel +#public net.minecraft.client.renderer.RenderItem func_175035_a(Lnet/minecraft/client/renderer/block/model/IBakedModel;I)V # renderModel +#public net.minecraft.client.renderer.RenderItem func_175036_a(Lnet/minecraft/client/renderer/block/model/IBakedModel;Lnet/minecraft/item/ItemStack;)V # renderModel From 40ae8100e3138e79746a29560cbaf254134341eb Mon Sep 17 00:00:00 2001 From: "RWTema (other machine)" Date: Sat, 6 May 2017 15:56:57 +0100 Subject: [PATCH 2/4] Improve handling of energy when drain is zero --- .../blocks/BlockFrameProjector.java | 2 +- .../funkylocomotion/blocks/TilePowered.java | 50 ++++++++++--------- 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockFrameProjector.java b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockFrameProjector.java index 97583eb..68c3daa 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockFrameProjector.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockFrameProjector.java @@ -108,7 +108,7 @@ public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, return true; } } - return false; + return true; } @Override diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/TilePowered.java b/src/main/java/com/rwtema/funkylocomotion/blocks/TilePowered.java index 01c907c..3d4931b 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/TilePowered.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/TilePowered.java @@ -13,7 +13,7 @@ public class TilePowered extends TileEntity { public final EnergyStorageSerializable energy; - public final IEnergyStorage public_energy_wrapper; + private final IEnergyStorage public_energy_wrapper; public TilePowered(int capacity) { energy = new EnergyStorageSerializable(capacity, capacity, capacity) { @@ -36,31 +36,35 @@ public int extractEnergy(int maxExtract, boolean simulate) { } }; - public_energy_wrapper = new IEnergyStorage() { - public int receiveEnergy(int maxReceive, boolean simulate) { - return energy.receiveEnergy(maxReceive, simulate); - } + if (TilePusher.powerPerTile > 0) { + public_energy_wrapper = new IEnergyStorage() { + public int receiveEnergy(int maxReceive, boolean simulate) { + return energy.receiveEnergy(maxReceive, simulate); + } - public int extractEnergy(int maxExtract, boolean simulate) { - return 0; - } + public int extractEnergy(int maxExtract, boolean simulate) { + return 0; + } - public int getEnergyStored() { - return energy.getEnergyStored(); - } + public int getEnergyStored() { + return energy.getEnergyStored(); + } - public int getMaxEnergyStored() { - return energy.getMaxEnergyStored(); - } + public int getMaxEnergyStored() { + return energy.getMaxEnergyStored(); + } - public boolean canExtract() { - return false; - } + public boolean canExtract() { + return false; + } - public boolean canReceive() { - return true; - } - }; + public boolean canReceive() { + return true; + } + }; + } else { + public_energy_wrapper = null; + } } @Override @@ -81,13 +85,13 @@ public NBTTagCompound writeToNBT(NBTTagCompound tag) { @Override public boolean hasCapability(@Nonnull Capability capability, @Nonnull EnumFacing facing) { - return capability == CapabilityEnergy.ENERGY || super.hasCapability(capability, facing); + return (capability == CapabilityEnergy.ENERGY && TilePusher.powerPerTile > 0) || super.hasCapability(capability, facing); } @Nonnull @Override public T getCapability(@Nonnull Capability capability, @Nonnull EnumFacing facing) { - if (capability == CapabilityEnergy.ENERGY) { + if (capability == CapabilityEnergy.ENERGY && TilePusher.powerPerTile > 0) { return CapabilityEnergy.ENERGY.cast(public_energy_wrapper); } return super.getCapability(capability, facing); From f2f354476f197bc8d52422860b8094553e9ec036 Mon Sep 17 00:00:00 2001 From: "RWTema (other machine)" Date: Sat, 6 May 2017 15:57:07 +0100 Subject: [PATCH 3/4] Remove junk code --- src/main/java/com/rwtema/funkylocomotion/FunkyLocomotion.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/rwtema/funkylocomotion/FunkyLocomotion.java b/src/main/java/com/rwtema/funkylocomotion/FunkyLocomotion.java index 4184c72..93f57d7 100644 --- a/src/main/java/com/rwtema/funkylocomotion/FunkyLocomotion.java +++ b/src/main/java/com/rwtema/funkylocomotion/FunkyLocomotion.java @@ -29,7 +29,6 @@ import net.minecraftforge.fml.common.registry.GameRegistry; @Mod(modid = FunkyLocomotion.MODID, version = FunkyLocomotion.VERSION) - //dependencies = "after:ThermalExpansion;after:ThermalFoundation;required-after:Forge@[10.13.1.1217,)") public class FunkyLocomotion { public static final String MODID = "funkylocomotion"; public static final String VERSION = "1.0"; From 7454c207f5bec977151a46c361a969738fadfd31 Mon Sep 17 00:00:00 2001 From: "Caio \"Jabulba\" Jabulka" Date: Sat, 13 May 2017 18:07:44 -0300 Subject: [PATCH 4/4] Backport 1.11 changes and fixes to 1.10.2 --- build.gradle | 10 +++---- .../funkylocomotion/CreativeTabFrames.java | 10 +++---- .../EntityMovingEventHandler.java | 5 ++-- .../rwtema/funkylocomotion/ProxyClient.java | 2 +- .../funkylocomotion/blocks/BlockBooster.java | 12 +++++---- .../blocks/BlockFLMultiState.java | 3 ++- .../funkylocomotion/blocks/BlockFrame.java | 6 ++--- .../blocks/BlockFrameProjector.java | 13 ++++++---- .../funkylocomotion/blocks/BlockMoving.java | 19 +++++++------- .../funkylocomotion/blocks/BlockPusher.java | 16 +++++++----- .../funkylocomotion/blocks/BlockSlider.java | 10 ++++--- .../blocks/BlockStickyFrame.java | 15 ++++++----- .../funkylocomotion/blocks/BlockTeleport.java | 13 +++++----- .../blocks/TileMovingClient.java | 13 +++++----- .../blocks/TileMovingServer.java | 5 ++-- .../funkylocomotion/blocks/TilePusher.java | 13 ++++------ .../funkylocomotion/blocks/TileTeleport.java | 17 ++++++------ .../debug/DebugEventHandler.java | 2 +- .../description/Describer.java | 2 +- .../fakes/FakeWorldClient.java | 4 +-- .../funkylocomotion/helper/BlockHelper.java | 19 ++++++-------- .../funkylocomotion/helper/ItemHelper.java | 2 +- .../helper/MethodHandleUtils.java | 3 ++- .../funkylocomotion/items/ItemBlockFrame.java | 7 ++--- .../items/ItemBlockTeleporter.java | 19 +++++++------- .../funkylocomotion/items/ItemWrench.java | 19 +++++++------- .../funkylocomotion/movers/MoveManager.java | 18 +++++-------- .../movers/MovingTileRegistry.java | 2 +- .../network/MessageObstruction.java | 2 +- .../particles/ObstructionHelper.java | 9 ++++--- .../rendering/PassHandler.java | 7 ++--- .../funkylocomotion/rendering/TESRMoving.java | 26 ++++++++----------- 32 files changed, 163 insertions(+), 160 deletions(-) diff --git a/build.gradle b/build.gradle index 12fc973..7c43daf 100644 --- a/build.gradle +++ b/build.gradle @@ -9,14 +9,14 @@ buildscript { } apply plugin: 'net.minecraftforge.gradle.forge' -version = "0.0.3-masafixes.5" +version = "0.0.3-1.10.2masafixes.5" group= "com.rwtema.funkylocomotion" // http://maven.apache.org/guides/mini/guide-naming-conventions.html -archivesBaseName = "funky-locomotion-1.11.2-alpha" +archivesBaseName = "funky-locomotion-1.10.2-alpha" minecraft { - version = "1.11.2-13.20.0.2230" + version = "1.10.2-12.18.2.2114" runDir = "run" - mappings = "snapshot_20170214" + mappings = "snapshot_20161029" makeObfSourceJar = false } @@ -31,7 +31,7 @@ minecraft { } dependencies { - deobfCompile "mezz.jei:jei_1.11.2:4.2.4.226" + deobfCompile "mezz.jei:jei_1.10.2:3.12.7.312" } diff --git a/src/main/java/com/rwtema/funkylocomotion/CreativeTabFrames.java b/src/main/java/com/rwtema/funkylocomotion/CreativeTabFrames.java index 29f1d55..7e411fe 100644 --- a/src/main/java/com/rwtema/funkylocomotion/CreativeTabFrames.java +++ b/src/main/java/com/rwtema/funkylocomotion/CreativeTabFrames.java @@ -1,10 +1,10 @@ package com.rwtema.funkylocomotion; -import javax.annotation.Nonnull; -import org.apache.commons.lang3.Validate; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; +import org.apache.commons.lang3.Validate; + +import javax.annotation.Nonnull; public class CreativeTabFrames extends CreativeTabs { public CreativeTabFrames() { @@ -13,7 +13,7 @@ public CreativeTabFrames() { @Nonnull @Override - public ItemStack getTabIconItem() { - return new ItemStack(Validate.notNull(Item.getItemFromBlock(FunkyLocomotion.pusher))); + public Item getTabIconItem() { + return Validate.notNull(Item.getItemFromBlock(FunkyLocomotion.pusher)); } } diff --git a/src/main/java/com/rwtema/funkylocomotion/EntityMovingEventHandler.java b/src/main/java/com/rwtema/funkylocomotion/EntityMovingEventHandler.java index a3a6db6..faa9b42 100644 --- a/src/main/java/com/rwtema/funkylocomotion/EntityMovingEventHandler.java +++ b/src/main/java/com/rwtema/funkylocomotion/EntityMovingEventHandler.java @@ -1,7 +1,5 @@ package com.rwtema.funkylocomotion; -import java.util.List; -import java.util.WeakHashMap; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.math.AxisAlignedBB; @@ -11,6 +9,9 @@ import net.minecraftforge.fml.common.gameevent.TickEvent; import net.minecraftforge.fml.relauncher.Side; +import java.util.List; +import java.util.WeakHashMap; + public class EntityMovingEventHandler { public static final WeakHashMap client = new WeakHashMap<>(); public static final WeakHashMap server = new WeakHashMap<>(); diff --git a/src/main/java/com/rwtema/funkylocomotion/ProxyClient.java b/src/main/java/com/rwtema/funkylocomotion/ProxyClient.java index 47f9b3e..51aa9bd 100644 --- a/src/main/java/com/rwtema/funkylocomotion/ProxyClient.java +++ b/src/main/java/com/rwtema/funkylocomotion/ProxyClient.java @@ -109,7 +109,7 @@ private void registerBlockItemModel(Block block) { @Override public World getClientWorld() { - return Minecraft.getMinecraft().world; + return Minecraft.getMinecraft().theWorld; } @Override diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockBooster.java b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockBooster.java index 615c0ab..8e06773 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockBooster.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockBooster.java @@ -1,6 +1,5 @@ package com.rwtema.funkylocomotion.blocks; -import javax.annotation.Nonnull; import com.rwtema.funkylocomotion.FunkyLocomotion; import com.rwtema.funkylocomotion.helper.ItemHelper; import com.rwtema.funkylocomotion.movers.IMover; @@ -19,6 +18,9 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + public class BlockBooster extends Block { public BlockBooster() { super(Material.ROCK); @@ -30,7 +32,7 @@ public BlockBooster() { @Override public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, - EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) { + EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) { if (!worldIn.isRemote) { ItemStack item = playerIn.getHeldItem(hand); if (!(ItemHelper.isWrench(item))) @@ -50,9 +52,9 @@ public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, @Nonnull @Override - public IBlockState getStateForPlacement(World worldIn, BlockPos pos, EnumFacing facing, - float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, EnumHand hand) { - IBlockState state = super.getStateForPlacement(worldIn, pos, facing, hitX, hitY, hitZ, meta, placer, hand); + public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, + float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { + IBlockState state = super.onBlockPlaced(worldIn, pos, facing, hitX, hitY, hitZ, meta, placer); EnumFacing opposite = facing.getOpposite(); if (worldIn.getTileEntity(pos.offset(opposite)) instanceof IMover) { return state.withProperty(BlockDirectional.FACING, opposite); diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockFLMultiState.java b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockFLMultiState.java index 6e9e504..72e7074 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockFLMultiState.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockFLMultiState.java @@ -1,12 +1,13 @@ package com.rwtema.funkylocomotion.blocks; -import javax.annotation.Nonnull; import net.minecraft.block.Block; import net.minecraft.block.material.MapColor; import net.minecraft.block.material.Material; import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; +import javax.annotation.Nonnull; + public abstract class BlockFLMultiState extends Block { public BlockFLMultiState(Material blockMaterialIn, MapColor blockMapColorIn) { super(blockMaterialIn, blockMapColorIn); diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockFrame.java b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockFrame.java index 44b6b28..3d52285 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockFrame.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockFrame.java @@ -1,6 +1,5 @@ package com.rwtema.funkylocomotion.blocks; -import javax.annotation.Nonnull; import com.rwtema.funkylocomotion.api.IStickyBlock; import net.minecraft.block.Block; import net.minecraft.block.material.Material; @@ -10,6 +9,8 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import javax.annotation.Nonnull; + public class BlockFrame extends Block implements IStickyBlock { public BlockFrame() { super(Material.ROCK); @@ -17,7 +18,6 @@ public BlockFrame() { this.setHardness(1); } - @SuppressWarnings("deprecation") @Override public boolean shouldSideBeRendered(IBlockState blockState, @Nonnull IBlockAccess blockAccess, @Nonnull BlockPos pos, EnumFacing side) { return super.shouldSideBeRendered(blockState, blockAccess, pos, side) && @@ -45,7 +45,7 @@ public boolean isFullyOpaque(IBlockState state) { } @Override - public boolean causesSuffocation(IBlockState state) { + public boolean isVisuallyOpaque() { return false; } diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockFrameProjector.java b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockFrameProjector.java index 68c3daa..c89efb1 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockFrameProjector.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockFrameProjector.java @@ -1,11 +1,11 @@ package com.rwtema.funkylocomotion.blocks; -import javax.annotation.Nonnull; import com.rwtema.funkylocomotion.FunkyLocomotion; import com.rwtema.funkylocomotion.helper.BlockHelper; import com.rwtema.funkylocomotion.helper.ItemHelper; import net.minecraft.block.Block; import net.minecraft.block.BlockDirectional; +import net.minecraft.block.BlockPistonBase; import net.minecraft.block.material.Material; import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; @@ -19,6 +19,9 @@ import net.minecraft.world.World; import net.minecraft.world.WorldServer; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + public class BlockFrameProjector extends BlockFLMultiState { public BlockFrameProjector() { @@ -59,8 +62,8 @@ public TileEntity createTileEntity(@Nonnull World world, @Nonnull IBlockState st @Nonnull @Override public IBlockState getStateForPlacement(@Nonnull World world, @Nonnull BlockPos pos, @Nonnull EnumFacing facing, - float hitX, float hitY, float hitZ, int meta, @Nonnull EntityLivingBase placer, EnumHand hand) { - EnumFacing facingFromEntity = EnumFacing.getDirectionFromEntityLiving(pos, placer); + float hitX, float hitY, float hitZ, int meta, @Nonnull EntityLivingBase placer, ItemStack stack) { + EnumFacing facingFromEntity = BlockPistonBase.getFacingFromEntity(pos, placer); return getDefaultState().withProperty(BlockDirectional.FACING, facingFromEntity); } @@ -74,7 +77,7 @@ public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, Enti @Override public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, - EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) { + EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) { if (!worldIn.isRemote) { ItemStack item = playerIn.getHeldItem(hand); if (!(ItemHelper.isWrench(item))) @@ -112,7 +115,7 @@ public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, } @Override - public void neighborChanged(IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos) { + public void neighborChanged(IBlockState state, World world, BlockPos pos, Block blockIn) { TileEntity tile = world.getTileEntity(pos); if (!(tile instanceof TileFrameProjector)) return; diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockMoving.java b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockMoving.java index 4ecfb28..e3f864c 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockMoving.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockMoving.java @@ -1,9 +1,5 @@ package com.rwtema.funkylocomotion.blocks; -import java.util.List; -import java.util.Random; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import com.rwtema.funkylocomotion.fakes.FakeWorldClient; import net.minecraft.block.Block; import net.minecraft.block.material.Material; @@ -24,6 +20,11 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import java.util.List; +import java.util.Random; + public class BlockMoving extends Block { public static BlockMoving instance; private final AxisAlignedBB ZERO_BOUNDS = new AxisAlignedBB(0, 0, 0, 0, 0, 0); @@ -41,7 +42,7 @@ public static boolean _Immoveable() { @Override public void addCollisionBoxToList(IBlockState state, @Nonnull World worldIn, @Nonnull BlockPos pos, @Nonnull AxisAlignedBB entityBox, - @Nonnull List collidingBoxes, @Nullable Entity entityIn, boolean p_185477_7_) { + @Nonnull List collidingBoxes, @Nullable Entity entityIn) { TileEntity tile = worldIn.getTileEntity(pos); if (!(tile instanceof TileMovingBase)) return; @@ -64,7 +65,7 @@ public void addCollisionBoxToList(IBlockState state, @Nonnull World worldIn, @No @Nullable @Override - public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, @Nonnull IBlockAccess worldIn, @Nonnull BlockPos pos) { + public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, @Nonnull World worldIn, @Nonnull BlockPos pos) { return getBounds(worldIn, pos, false, false); } @@ -92,7 +93,7 @@ public TileEntity createTileEntity(@Nonnull World world, @Nonnull IBlockState st } @Override - public boolean causesSuffocation(IBlockState state) { + public boolean isVisuallyOpaque() { return false; } @@ -114,7 +115,7 @@ public boolean isNormalCube(IBlockState state, IBlockAccess world, BlockPos pos) @Nonnull @Override public ItemStack getPickBlock(@Nonnull IBlockState state, RayTraceResult target, @Nonnull World world, @Nonnull BlockPos pos, EntityPlayer player) { - return ItemStack.EMPTY; + return null; } @Nonnull @@ -160,7 +161,7 @@ public int getLightOpacity(IBlockState state, IBlockAccess world, BlockPos pos) @Override public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, - EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) { + EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) { if (worldIn.isRemote) return false; diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockPusher.java b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockPusher.java index a39e09f..243ab9b 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockPusher.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockPusher.java @@ -1,6 +1,5 @@ package com.rwtema.funkylocomotion.blocks; -import javax.annotation.Nonnull; import com.rwtema.funkylocomotion.FunkyLocomotion; import com.rwtema.funkylocomotion.api.ISlipperyBlock; import com.rwtema.funkylocomotion.helper.ItemHelper; @@ -20,12 +19,15 @@ import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.minecraft.util.IStringSerializable; -import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraft.world.WorldServer; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import java.util.List; + public class BlockPusher extends BlockFLMultiState implements ISlipperyBlock { public static final PropertyEnum PUSH_PULL_TYPE = PropertyEnum.create("push_pull", PushPullType.class); @@ -39,8 +41,8 @@ public BlockPusher() { @Nonnull @Override public IBlockState getStateForPlacement(@Nonnull World world, @Nonnull BlockPos pos, @Nonnull EnumFacing facing, - float hitX, float hitY, float hitZ, int meta, @Nonnull EntityLivingBase placer, EnumHand hand) { - IBlockState state = super.getStateForPlacement(world, pos, facing, hitX, hitY, hitZ, meta, placer, hand); + float hitX, float hitY, float hitZ, int meta, @Nonnull EntityLivingBase placer, ItemStack stack) { + IBlockState state = super.getStateForPlacement(world, pos, facing, hitX, hitY, hitZ, meta, placer, stack); return state.withProperty(BlockDirectional.FACING, facing.getOpposite()); } @@ -62,14 +64,14 @@ public int damageDropped(IBlockState state) { } @Override - public void getSubBlocks(@Nonnull Item itemIn, CreativeTabs tab, NonNullList list) { + public void getSubBlocks(@Nonnull Item itemIn, CreativeTabs tab, List list) { list.add(new ItemStack(itemIn, 1, 0)); list.add(new ItemStack(itemIn, 1, 1)); } @Override public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, - EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) { + EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) { if (!worldIn.isRemote) { ItemStack item = playerIn.getHeldItem(hand); if (!(ItemHelper.isWrench(item))) @@ -93,7 +95,7 @@ public boolean canStickTo(World world, BlockPos pos, EnumFacing dir) { } @Override - public void neighborChanged(IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos) { + public void neighborChanged(IBlockState state, World world, BlockPos pos, Block blockIn) { TileEntity tile = world.getTileEntity(pos); if (!(tile instanceof TilePusher)) return; diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockSlider.java b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockSlider.java index f47e2e7..7d7fcd9 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockSlider.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockSlider.java @@ -1,6 +1,5 @@ package com.rwtema.funkylocomotion.blocks; -import javax.annotation.Nonnull; import com.rwtema.funkylocomotion.helper.BlockHelper; import com.rwtema.funkylocomotion.helper.ItemHelper; import net.minecraft.block.BlockDirectional; @@ -14,11 +13,14 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; -import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import java.util.List; + public class BlockSlider extends BlockPusher { public static final PropertyInteger SUB_ROTATION = PropertyInteger.create("sub_rot", 0, 3); @@ -33,7 +35,7 @@ public BlockSlider() { } @Override - public void getSubBlocks(@Nonnull Item itemIn, CreativeTabs tab, NonNullList list) { + public void getSubBlocks(@Nonnull Item itemIn, CreativeTabs tab, List list) { list.add(new ItemStack(itemIn, 1, 0)); } @@ -74,7 +76,7 @@ public IBlockState getActualState(@Nonnull IBlockState state, IBlockAccess world @Override public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, - EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) { + EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) { if (worldIn.isRemote) { return false; } diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockStickyFrame.java b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockStickyFrame.java index b75be85..6cb6c39 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockStickyFrame.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockStickyFrame.java @@ -1,8 +1,5 @@ package com.rwtema.funkylocomotion.blocks; -import java.util.EnumMap; -import javax.annotation.Nonnull; -import org.apache.commons.lang3.Validate; import com.google.common.collect.ImmutableList; import com.rwtema.funkylocomotion.FunkyLocomotion; import com.rwtema.funkylocomotion.helper.ItemHelper; @@ -17,9 +14,14 @@ import net.minecraft.util.BlockRenderLayer; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; -import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; +import org.apache.commons.lang3.Validate; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import java.util.EnumMap; +import java.util.List; public class BlockStickyFrame extends BlockFrame { public static final BlockStickyFrame[] blocks = new BlockStickyFrame[4]; @@ -111,10 +113,9 @@ public int getMetaFromState(IBlockState state) { return getRawMeta(state) & 15; } - @SuppressWarnings("deprecation") @Override public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, - EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) { + EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) { ItemStack item = playerIn.getHeldItem(hand); if (!(ItemHelper.isWrench(item))) return false; @@ -160,7 +161,7 @@ public ImmutableList getValidStates() { } @Override - public void getSubBlocks(@Nonnull Item itemIn, CreativeTabs tab, NonNullList list) { + public void getSubBlocks(@Nonnull Item itemIn, CreativeTabs tab, List list) { if (index == 0) { list.add(new ItemStack(itemIn)); } diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockTeleport.java b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockTeleport.java index f732c9f..6f5c7b9 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/BlockTeleport.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/BlockTeleport.java @@ -1,8 +1,5 @@ package com.rwtema.funkylocomotion.blocks; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import org.apache.commons.lang3.Validate; import com.rwtema.funkylocomotion.items.ItemBlockTeleporter; import net.minecraft.block.BlockDirectional; import net.minecraft.block.state.BlockStateContainer; @@ -15,9 +12,13 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; -import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; +import org.apache.commons.lang3.Validate; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import java.util.List; public class BlockTeleport extends BlockPusher { public BlockTeleport() { @@ -32,7 +33,7 @@ public int damageDropped(IBlockState state) { } @Override - public void getSubBlocks(@Nonnull Item itemIn, CreativeTabs tab, NonNullList list) { + public void getSubBlocks(@Nonnull Item itemIn, CreativeTabs tab, List list) { list.add(new ItemStack(itemIn, 1, 0)); } @@ -47,7 +48,7 @@ public TileEntity createTileEntity(@Nonnull World world, @Nonnull IBlockState st public ItemStack getItem(World worldIn, BlockPos pos, @Nonnull IBlockState state) { @SuppressWarnings("deprecation") ItemStack item = super.getItem(worldIn, pos, state); - if (item.isEmpty() == false) { + if (item != null) { TileEntity tileEntity = worldIn.getTileEntity(pos); if (tileEntity instanceof TileTeleport) { int teleportId = ((TileTeleport) tileEntity).teleportId; diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/TileMovingClient.java b/src/main/java/com/rwtema/funkylocomotion/blocks/TileMovingClient.java index 54bdbbb..c8f7290 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/TileMovingClient.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/TileMovingClient.java @@ -1,9 +1,5 @@ package com.rwtema.funkylocomotion.blocks; -import java.lang.ref.WeakReference; -import java.util.HashMap; -import java.util.HashSet; -import javax.annotation.Nonnull; import com.rwtema.funkylocomotion.description.Describer; import com.rwtema.funkylocomotion.fakes.FakeWorldClient; import com.rwtema.funkylocomotion.rendering.ChunkRerenderer; @@ -21,6 +17,11 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import javax.annotation.Nonnull; +import java.lang.ref.WeakReference; +import java.util.HashMap; +import java.util.HashSet; + public class TileMovingClient extends TileMovingBase { public static final HashMap> cachedTiles = new HashMap<>(); public static final HashSet> renderBlackList = new HashSet<>(); @@ -84,10 +85,10 @@ public void handleUpdateTag(NBTTagCompound tag) { // tile = ref.get(); } - if (tile != null && FakeWorldClient.isValid(getWorld()) && tile.getWorld() == this.getWorld()) { + if (tile != null && FakeWorldClient.isValid(worldObj) && tile.getWorld() == this.worldObj) { rawTile = true; tile.setPos(pos.toImmutable()); - tile.setWorld(FakeWorldClient.getFakeWorldWrapper(this.getWorld())); + tile.setWorldObj(FakeWorldClient.getFakeWorldWrapper(this.getWorld())); tile.updateContainingBlockInfo(); this.tile = tile; render = true; diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/TileMovingServer.java b/src/main/java/com/rwtema/funkylocomotion/blocks/TileMovingServer.java index 8d26b6e..2da9952 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/TileMovingServer.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/TileMovingServer.java @@ -1,7 +1,5 @@ package com.rwtema.funkylocomotion.blocks; -import java.lang.ref.WeakReference; -import javax.annotation.Nonnull; import com.rwtema.funkylocomotion.movers.MoverEventHandler; import com.rwtema.funkylocomotion.movers.MovingTileRegistry; import net.minecraft.entity.player.EntityPlayer; @@ -10,6 +8,9 @@ import net.minecraft.util.EnumHand; import net.minecraftforge.fml.relauncher.Side; +import javax.annotation.Nonnull; +import java.lang.ref.WeakReference; + public class TileMovingServer extends TileMovingBase { public WeakReference activatingPlayer = null; diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/TilePusher.java b/src/main/java/com/rwtema/funkylocomotion/blocks/TilePusher.java index 691b434..be09e54 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/TilePusher.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/TilePusher.java @@ -1,13 +1,5 @@ package com.rwtema.funkylocomotion.blocks; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedList; -import java.util.List; -import java.util.UUID; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import org.apache.commons.lang3.StringUtils; import com.mojang.authlib.GameProfile; import com.rwtema.funkylocomotion.FunkyLocomotion; import com.rwtema.funkylocomotion.api.FunkyCapabilities; @@ -30,6 +22,11 @@ import net.minecraft.world.World; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.energy.CapabilityEnergy; +import org.apache.commons.lang3.StringUtils; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import java.util.*; public class TilePusher extends TilePowered implements IMover, ITickable { public static final int[] moveTime = new int[]{ diff --git a/src/main/java/com/rwtema/funkylocomotion/blocks/TileTeleport.java b/src/main/java/com/rwtema/funkylocomotion/blocks/TileTeleport.java index 2400492..4c2f1a6 100644 --- a/src/main/java/com/rwtema/funkylocomotion/blocks/TileTeleport.java +++ b/src/main/java/com/rwtema/funkylocomotion/blocks/TileTeleport.java @@ -1,16 +1,11 @@ package com.rwtema.funkylocomotion.blocks; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import com.rwtema.funkylocomotion.FunkyLocomotion; import com.rwtema.funkylocomotion.helper.BlockHelper; import com.rwtema.funkylocomotion.helper.WeakSet; import com.rwtema.funkylocomotion.movers.MoveManager; import com.rwtema.funkylocomotion.particles.ObstructionHelper; +import gnu.trove.map.hash.TLongObjectHashMap; import net.minecraft.block.BlockDirectional; import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTTagCompound; @@ -21,7 +16,13 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; -import gnu.trove.map.hash.TLongObjectHashMap; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; public class TileTeleport extends TilePusher { static TLongObjectHashMap> cache = new TLongObjectHashMap<>(); @@ -71,7 +72,7 @@ private TileTeleport getTileTeleport() { if (tile.isInvalid()) iterator.remove(); - if (tile == this || !tile.hasWorld()) + if (tile == this || !tile.hasWorldObj()) continue; World world = tile.getWorld(); diff --git a/src/main/java/com/rwtema/funkylocomotion/debug/DebugEventHandler.java b/src/main/java/com/rwtema/funkylocomotion/debug/DebugEventHandler.java index 51d83c8..241ba97 100644 --- a/src/main/java/com/rwtema/funkylocomotion/debug/DebugEventHandler.java +++ b/src/main/java/com/rwtema/funkylocomotion/debug/DebugEventHandler.java @@ -17,7 +17,7 @@ public class DebugEventHandler { @SubscribeEvent @SideOnly(Side.CLIENT) public void renderTiles(TickEvent.WorldTickEvent event) { - WorldClient clientWorld = Minecraft.getMinecraft().world; + WorldClient clientWorld = Minecraft.getMinecraft().theWorld; if (event.world == null || clientWorld == null) return; diff --git a/src/main/java/com/rwtema/funkylocomotion/description/Describer.java b/src/main/java/com/rwtema/funkylocomotion/description/Describer.java index bef78e0..01c745e 100644 --- a/src/main/java/com/rwtema/funkylocomotion/description/Describer.java +++ b/src/main/java/com/rwtema/funkylocomotion/description/Describer.java @@ -35,7 +35,7 @@ public static TileEntity recreateTileEntity(NBTTagCompound tag, IBlockState stat fakeWorldWrapper.blockstateOverides.put(pos, state); fakeWorldWrapper.tileOverides.put(pos, tile); - tile.setWorld(fakeWorldWrapper); + tile.setWorldObj(fakeWorldWrapper); tile.setPos(pos); tile.updateContainingBlockInfo(); diff --git a/src/main/java/com/rwtema/funkylocomotion/fakes/FakeWorldClient.java b/src/main/java/com/rwtema/funkylocomotion/fakes/FakeWorldClient.java index 25cb24b..06b205d 100644 --- a/src/main/java/com/rwtema/funkylocomotion/fakes/FakeWorldClient.java +++ b/src/main/java/com/rwtema/funkylocomotion/fakes/FakeWorldClient.java @@ -70,7 +70,7 @@ private FakeWorldClient(World world) { new WorldSettings(world.getWorldInfo()), world.provider.getDimension(), world.getDifficulty(), - world.profiler); + world.theProfiler); this.world = world; this.worldClient = world instanceof WorldClient ? ((WorldClient) world) : null; @@ -223,7 +223,7 @@ public boolean isSideSolid(BlockPos pos, @Nonnull EnumFacing side, boolean _defa } @Override - public boolean spawnEntity(@Nonnull Entity entity) { + public boolean spawnEntityInWorld(@Nonnull Entity entity) { return false; } diff --git a/src/main/java/com/rwtema/funkylocomotion/helper/BlockHelper.java b/src/main/java/com/rwtema/funkylocomotion/helper/BlockHelper.java index 39de9ae..f3581bd 100644 --- a/src/main/java/com/rwtema/funkylocomotion/helper/BlockHelper.java +++ b/src/main/java/com/rwtema/funkylocomotion/helper/BlockHelper.java @@ -1,8 +1,5 @@ package com.rwtema.funkylocomotion.helper; -import java.lang.invoke.MethodHandle; -import java.lang.reflect.Field; -import javax.annotation.Nullable; import com.mojang.authlib.GameProfile; import com.rwtema.funkylocomotion.api.FunkyCapabilities; import com.rwtema.funkylocomotion.api.IMoveCheck; @@ -24,6 +21,10 @@ import net.minecraft.world.chunk.storage.ExtendedBlockStorage; import net.minecraftforge.fml.relauncher.ReflectionHelper; +import javax.annotation.Nullable; +import java.lang.invoke.MethodHandle; +import java.lang.reflect.Field; + public class BlockHelper { private static final MethodHandle methodHandle_Chunk_relightBlock = MethodHandleUtils.getMethodHandleVirtual(Chunk.class, new String[] { "func_76615_h", "relightBlock" }, int.class, int.class, int.class); @@ -67,7 +68,7 @@ public static boolean silentSetBlock(Chunk chunk, BlockPos pos, Block block, int return false; } - extendedblockstorage = chunk.getBlockStorageArray()[y >> 4] = new ExtendedBlockStorage(y >> 4 << 4, !chunk.getWorld().provider.hasNoSky()); + extendedblockstorage = chunk.getBlockStorageArray()[y >> 4] = new ExtendedBlockStorage(y >> 4 << 4, !chunk.getWorld().provider.getHasNoSky()); } extendedblockstorage.set(dx, y & 15, dz, block.getStateFromMeta(meta)); @@ -139,13 +140,9 @@ public static void postUpdateBlock(World world, BlockPos pos) { markBlockForUpdate(world, pos); if (!world.isRemote) { - // TODO: Is this correct in 1.11? - world.neighborChanged(pos, Blocks.AIR, pos); - world.neighborChanged(pos, newBlock, pos); - // It used to be this in 1.10: - //world.notifyBlockOfStateChange(pos, Blocks.AIR); - //world.notifyBlockOfStateChange(pos, newBlock); - world.notifyNeighborsOfStateChange(pos, newBlock, false); + world.notifyBlockOfStateChange(pos, Blocks.AIR); + world.notifyBlockOfStateChange(pos, newBlock); + world.notifyNeighborsOfStateChange(pos, newBlock); if (newState.hasComparatorInputOverride()) { world.updateComparatorOutputLevel(pos, newBlock); diff --git a/src/main/java/com/rwtema/funkylocomotion/helper/ItemHelper.java b/src/main/java/com/rwtema/funkylocomotion/helper/ItemHelper.java index 5b55c29..2543b63 100644 --- a/src/main/java/com/rwtema/funkylocomotion/helper/ItemHelper.java +++ b/src/main/java/com/rwtema/funkylocomotion/helper/ItemHelper.java @@ -32,7 +32,7 @@ public class ItemHelper { public static boolean isWrench(ItemStack item) { - if (item.isEmpty()) + if (item == null || item.getItem() == null) return false; if (item.getItem() == Items.STICK || item.getItem() == FunkyLocomotion.wrench) diff --git a/src/main/java/com/rwtema/funkylocomotion/helper/MethodHandleUtils.java b/src/main/java/com/rwtema/funkylocomotion/helper/MethodHandleUtils.java index 1321b0b..fe0b380 100644 --- a/src/main/java/com/rwtema/funkylocomotion/helper/MethodHandleUtils.java +++ b/src/main/java/com/rwtema/funkylocomotion/helper/MethodHandleUtils.java @@ -1,9 +1,10 @@ package com.rwtema.funkylocomotion.helper; +import net.minecraftforge.fml.relauncher.ReflectionHelper.UnableToFindMethodException; + import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.reflect.Method; -import net.minecraftforge.fml.relauncher.ReflectionHelper.UnableToFindMethodException; public class MethodHandleUtils { diff --git a/src/main/java/com/rwtema/funkylocomotion/items/ItemBlockFrame.java b/src/main/java/com/rwtema/funkylocomotion/items/ItemBlockFrame.java index 077f9a4..10fb0dd 100644 --- a/src/main/java/com/rwtema/funkylocomotion/items/ItemBlockFrame.java +++ b/src/main/java/com/rwtema/funkylocomotion/items/ItemBlockFrame.java @@ -1,7 +1,5 @@ package com.rwtema.funkylocomotion.items; -import java.util.List; -import javax.annotation.Nonnull; import com.rwtema.funkylocomotion.blocks.BlockStickyFrame; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; @@ -11,6 +9,9 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import javax.annotation.Nonnull; +import java.util.List; + public class ItemBlockFrame extends ItemBlockMetadata { public final int index; @@ -60,6 +61,6 @@ public void addInformation(@Nonnull ItemStack item, @Nonnull EntityPlayer player } } - list.addAll(Minecraft.getMinecraft().fontRenderer.listFormattedStringToWidth(s, 60)); + list.addAll(Minecraft.getMinecraft().fontRendererObj.listFormattedStringToWidth(s, 60)); } } diff --git a/src/main/java/com/rwtema/funkylocomotion/items/ItemBlockTeleporter.java b/src/main/java/com/rwtema/funkylocomotion/items/ItemBlockTeleporter.java index 101c387..8853758 100644 --- a/src/main/java/com/rwtema/funkylocomotion/items/ItemBlockTeleporter.java +++ b/src/main/java/com/rwtema/funkylocomotion/items/ItemBlockTeleporter.java @@ -1,8 +1,5 @@ package com.rwtema.funkylocomotion.items; -import java.util.List; -import java.util.Random; -import javax.annotation.Nonnull; import com.rwtema.funkylocomotion.rendering.WordDictionary; import net.minecraft.block.Block; import net.minecraft.client.resources.I18n; @@ -16,13 +13,16 @@ import net.minecraft.util.EnumActionResult; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; -import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.util.text.TextComponentTranslation; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import javax.annotation.Nonnull; +import java.util.List; +import java.util.Random; + public class ItemBlockTeleporter extends ItemBlock { public static final String NBT_TELEPORTER_ID = "TeleportID"; @@ -58,23 +58,22 @@ public void onUpdate(ItemStack item, World world, Entity entity, int slot, boole } @Override - public void getSubItems(@Nonnull Item item, @Nonnull CreativeTabs tab, NonNullList list) { + public void getSubItems(@Nonnull Item item, @Nonnull CreativeTabs tab, @Nonnull List list) { list.add((new ItemStack(item, 1, 0))); } @Nonnull @Override - public EnumActionResult onItemUse(@Nonnull EntityPlayer playerIn, World worldIn, @Nonnull BlockPos pos, EnumHand hand, @Nonnull EnumFacing facing, float hitX, float hitY, float hitZ) { - ItemStack stack = playerIn.getHeldItem(hand); + public EnumActionResult onItemUse(ItemStack stack, @Nonnull EntityPlayer playerIn, World worldIn, @Nonnull BlockPos pos, EnumHand hand, @Nonnull EnumFacing facing, float hitX, float hitY, float hitZ) { NBTTagCompound tag = stack.getTagCompound(); if (tag == null || tag.getInteger(NBT_TELEPORTER_ID) == 0) { if (worldIn.isRemote) { - playerIn.sendMessage(new TextComponentTranslation("frame.teleport.no_id.0")); - playerIn.sendMessage(new TextComponentTranslation("frame.teleport.no_id.1")); + playerIn.addChatComponentMessage(new TextComponentTranslation("frame.teleport.no_id.0")); + playerIn.addChatComponentMessage(new TextComponentTranslation("frame.teleport.no_id.1")); } return EnumActionResult.FAIL; } - return super.onItemUse(playerIn, worldIn, pos, hand, facing, hitX, hitY, hitZ); + return super.onItemUse(stack, playerIn, worldIn, pos, hand, facing, hitX, hitY, hitZ); } @Override diff --git a/src/main/java/com/rwtema/funkylocomotion/items/ItemWrench.java b/src/main/java/com/rwtema/funkylocomotion/items/ItemWrench.java index dfc2436..0fb693e 100644 --- a/src/main/java/com/rwtema/funkylocomotion/items/ItemWrench.java +++ b/src/main/java/com/rwtema/funkylocomotion/items/ItemWrench.java @@ -1,7 +1,5 @@ package com.rwtema.funkylocomotion.items; -import java.util.List; -import javax.annotation.Nonnull; import com.rwtema.funkylocomotion.FunkyLocomotion; import com.rwtema.funkylocomotion.blocks.BlockStickyFrame; import com.rwtema.funkylocomotion.movers.IMover; @@ -17,7 +15,6 @@ import net.minecraft.util.EnumActionResult; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; -import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3d; import net.minecraft.world.IBlockAccess; @@ -28,6 +25,9 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import javax.annotation.Nonnull; +import java.util.List; + public class ItemWrench extends Item { public static final int metaWrenchNormal = 0; public static final int metaWrenchEye = 1; @@ -47,7 +47,7 @@ public ItemWrench() { @Override @SideOnly(Side.CLIENT) - public void getSubItems(@Nonnull Item item, CreativeTabs tab, NonNullList list) { + public void getSubItems(@Nonnull Item item, CreativeTabs tab, List list) { list.add(new ItemStack(item, 1, 0)); list.add(new ItemStack(item, 1, 1)); list.add(new ItemStack(item, 1, 2)); @@ -68,8 +68,7 @@ else if (stack.getItemDamage() == metaWrenchHammer) @Nonnull @Override - public EnumActionResult onItemUseFirst(EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, EnumHand hand) { - ItemStack stack = player.getHeldItem(hand); + public EnumActionResult onItemUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, EnumHand hand) { if (stack.getItemDamage() != metaWrenchHammer) return EnumActionResult.PASS; @@ -96,7 +95,7 @@ public EnumActionResult onItemUseFirst(EntityPlayer player, World world, BlockPo for (BlockPos.MutableBlockPos otherPos : BlockPos.getAllInBoxMutable(pos.offset(d1, -2).offset(d2, -2), pos.offset(d1, 2).offset(d2, 2))) { if (otherPos.equals(pos)) { - block.onBlockActivated(world, pos, state, player, hand, side, hitX, hitY, hitZ); + block.onBlockActivated(world, pos, state, player, hand, player.getHeldItem(hand), side, hitX, hitY, hitZ); } else { IBlockState otherBlockState = world.getBlockState(otherPos); otherBlock = otherBlockState.getBlock(); @@ -105,7 +104,7 @@ public EnumActionResult onItemUseFirst(EntityPlayer player, World world, BlockPo if (isInaccessible(world, side, hitX, hitY, hitZ, blockingPos)) continue; - otherBlock.onBlockActivated(world, otherPos, otherBlockState, player, hand, side, hitX, hitY, hitZ); + otherBlock.onBlockActivated(world, otherPos, otherBlockState, player, hand, player.getHeldItem(hand), side, hitX, hitY, hitZ); } } } @@ -121,7 +120,7 @@ public EnumActionResult onItemUseFirst(EntityPlayer player, World world, BlockPo BlockPos blockingPos = otherPos.offset(side.getOpposite()); if (!pos.equals(otherPos) && isInaccessible(world, side, hitX, hitY, hitZ, blockingPos)) continue; - otherBlock.onBlockActivated(world, otherPos, otherBlockState, player, hand, side, hitX, hitY, hitZ); + otherBlock.onBlockActivated(world, otherPos, otherBlockState, player, hand, player.getHeldItem(hand), side, hitX, hitY, hitZ); } } @@ -179,7 +178,7 @@ else if (itemstack.getItemDamage() == metaWrenchHammer) @SubscribeEvent public void leftClick(PlayerInteractEvent.LeftClickBlock event) { ItemStack heldItem = event.getEntityPlayer().getHeldItem(event.getHand()); - if (heldItem.isEmpty() || heldItem.getItem() != this) + if (heldItem == null || heldItem.getItem() != this) return; if (!event.getWorld().isRemote) { TileEntity tileEntity = event.getWorld().getTileEntity(event.getPos()); diff --git a/src/main/java/com/rwtema/funkylocomotion/movers/MoveManager.java b/src/main/java/com/rwtema/funkylocomotion/movers/MoveManager.java index 68d1620..3229a8e 100644 --- a/src/main/java/com/rwtema/funkylocomotion/movers/MoveManager.java +++ b/src/main/java/com/rwtema/funkylocomotion/movers/MoveManager.java @@ -1,16 +1,5 @@ package com.rwtema.funkylocomotion.movers; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import javax.annotation.Nullable; -import org.apache.commons.lang3.Validate; import com.rwtema.funkylocomotion.api.IMoveFactory; import com.rwtema.funkylocomotion.blocks.BlockMoving; import com.rwtema.funkylocomotion.blocks.TileMovingServer; @@ -39,6 +28,10 @@ import net.minecraft.world.NextTickListEntry; import net.minecraft.world.World; import net.minecraft.world.chunk.Chunk; +import org.apache.commons.lang3.Validate; + +import javax.annotation.Nullable; +import java.util.*; public class MoveManager { public static final NBTTagCompound airBlockTag; @@ -139,7 +132,7 @@ public synchronized static void startMoving(World srcWorld, World dstWorld, List e.lightlevel = state.getLightValue(srcWorld, srcPos); List axes = new ArrayList<>(); - state.addCollisionBoxToList(srcWorld, srcPos, TileEntity.INFINITE_EXTENT_AABB, axes, null, false); + state.addCollisionBoxToList(srcWorld, srcPos, TileEntity.INFINITE_EXTENT_AABB, axes, null); if (axes.size() > 0) { e.bb = new ArrayList<>(); @@ -479,6 +472,7 @@ public static void finishMoving() { state, player, tile.activatingHand, + player.getHeldItem(tile.activatingHand), tile.activatingSide, tile.activatingHitX, tile.activatingHitY, tile.activatingHitZ); } diff --git a/src/main/java/com/rwtema/funkylocomotion/movers/MovingTileRegistry.java b/src/main/java/com/rwtema/funkylocomotion/movers/MovingTileRegistry.java index 06f2730..342ce94 100644 --- a/src/main/java/com/rwtema/funkylocomotion/movers/MovingTileRegistry.java +++ b/src/main/java/com/rwtema/funkylocomotion/movers/MovingTileRegistry.java @@ -27,7 +27,7 @@ public static List getTilesFinishedMoving() { TileMovingServer tile = iterator.next(); if (tile.isInvalid()) iterator.remove(); - else if (tile.hasWorld() && tile.time >= tile.maxTime + else if (tile.hasWorldObj() && tile.time >= tile.maxTime && tile.getWorld().isBlockLoaded(tile.getPos()) // ensure the tile isn't in mid-chunk-load ) list.add(tile); diff --git a/src/main/java/com/rwtema/funkylocomotion/network/MessageObstruction.java b/src/main/java/com/rwtema/funkylocomotion/network/MessageObstruction.java index 525ed76..8796c6b 100644 --- a/src/main/java/com/rwtema/funkylocomotion/network/MessageObstruction.java +++ b/src/main/java/com/rwtema/funkylocomotion/network/MessageObstruction.java @@ -51,7 +51,7 @@ public void toBytes(ByteBuf buf) { @SideOnly(Side.CLIENT) private void handlePacket(MessageContext ctx) { for (int i = 0; i < 10; i++) - Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleObstruction(Minecraft.getMinecraft().world, x, y, z, side)); + Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleObstruction(Minecraft.getMinecraft().theWorld, x, y, z, side)); } diff --git a/src/main/java/com/rwtema/funkylocomotion/particles/ObstructionHelper.java b/src/main/java/com/rwtema/funkylocomotion/particles/ObstructionHelper.java index 8ca7f16..50b8db6 100644 --- a/src/main/java/com/rwtema/funkylocomotion/particles/ObstructionHelper.java +++ b/src/main/java/com/rwtema/funkylocomotion/particles/ObstructionHelper.java @@ -1,7 +1,5 @@ package com.rwtema.funkylocomotion.particles; -import java.lang.reflect.Field; -import java.util.List; import com.rwtema.funkylocomotion.FunkyLocomotion; import com.rwtema.funkylocomotion.items.ItemWrench; import com.rwtema.funkylocomotion.network.FLNetwork; @@ -19,12 +17,15 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import java.lang.reflect.Field; +import java.util.List; + public class ObstructionHelper { private static final Field field_PlayerChunkMapEntry_players = ReflectionHelper.findField(PlayerChunkMapEntry.class, "field_187283_c", "players"); @SideOnly(Side.CLIENT) public static boolean shouldRenderParticles() { - return playerHoldingWrench(Minecraft.getMinecraft().player); + return playerHoldingWrench(Minecraft.getMinecraft().thePlayer); } private static boolean playerHoldingWrench(EntityPlayer thePlayer) { @@ -32,7 +33,7 @@ private static boolean playerHoldingWrench(EntityPlayer thePlayer) { } private static boolean isEyeWrench(ItemStack heldItem) { - return heldItem.isEmpty() == false && + return heldItem != null && heldItem.getItem() == FunkyLocomotion.wrench && heldItem.getItemDamage() == ItemWrench.metaWrenchEye; } diff --git a/src/main/java/com/rwtema/funkylocomotion/rendering/PassHandler.java b/src/main/java/com/rwtema/funkylocomotion/rendering/PassHandler.java index da5b2c1..cd28fed 100644 --- a/src/main/java/com/rwtema/funkylocomotion/rendering/PassHandler.java +++ b/src/main/java/com/rwtema/funkylocomotion/rendering/PassHandler.java @@ -1,11 +1,12 @@ package com.rwtema.funkylocomotion.rendering; +import net.minecraft.client.renderer.GlStateManager; +import net.minecraft.util.BlockRenderLayer; +import org.lwjgl.opengl.GL11; + import java.util.Collections; import java.util.EnumSet; import java.util.Set; -import org.lwjgl.opengl.GL11; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.util.BlockRenderLayer; public enum PassHandler { diff --git a/src/main/java/com/rwtema/funkylocomotion/rendering/TESRMoving.java b/src/main/java/com/rwtema/funkylocomotion/rendering/TESRMoving.java index 48c8e4c..f662adf 100644 --- a/src/main/java/com/rwtema/funkylocomotion/rendering/TESRMoving.java +++ b/src/main/java/com/rwtema/funkylocomotion/rendering/TESRMoving.java @@ -1,17 +1,12 @@ package com.rwtema.funkylocomotion.rendering; -import org.lwjgl.opengl.GL11; import com.rwtema.funkylocomotion.blocks.TileMovingClient; import com.rwtema.funkylocomotion.fakes.FakeWorldClient; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.multiplayer.WorldClient; -import net.minecraft.client.renderer.BlockRendererDispatcher; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.RenderHelper; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.VertexBuffer; +import net.minecraft.client.renderer.*; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; @@ -24,6 +19,7 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.client.MinecraftForgeClient; +import org.lwjgl.opengl.GL11; public class TESRMoving extends TileEntitySpecialRenderer { private BlockRendererDispatcher blockRenderer; @@ -135,13 +131,13 @@ protected boolean renderDynamic(double x, double y, double z, float f, TileMovin GlStateManager.pushMatrix(); setupTranslations(x, y, z, mover, h, dir, renderer); try { - WorldClient prevWorld1 = Minecraft.getMinecraft().world; - World prevWorld2 = Minecraft.getMinecraft().player.world; - World prevWorld3 = rendererDispatcher.world; + WorldClient prevWorld1 = Minecraft.getMinecraft().theWorld; + World prevWorld2 = Minecraft.getMinecraft().thePlayer.worldObj; + World prevWorld3 = rendererDispatcher.worldObj; try { - Minecraft.getMinecraft().world = fakeWorldClient; - Minecraft.getMinecraft().player.world = fakeWorldClient; - TileEntityRendererDispatcher.instance.world = fakeWorldClient; + Minecraft.getMinecraft().theWorld = fakeWorldClient; + Minecraft.getMinecraft().thePlayer.worldObj = fakeWorldClient; + TileEntityRendererDispatcher.instance.worldObj = fakeWorldClient; renderer.setTranslation(0, 0, 0); mover.tile.updateContainingBlockInfo(); RenderHelper.enableStandardItemLighting(); @@ -149,9 +145,9 @@ protected boolean renderDynamic(double x, double y, double z, float f, TileMovin RenderHelper.disableStandardItemLighting(); renderer.setTranslation(0, 0, 0); } finally { - Minecraft.getMinecraft().world = prevWorld1; - Minecraft.getMinecraft().player.world = prevWorld2; - TileEntityRendererDispatcher.instance.world = prevWorld3; + Minecraft.getMinecraft().theWorld = prevWorld1; + Minecraft.getMinecraft().thePlayer.worldObj = prevWorld2; + TileEntityRendererDispatcher.instance.worldObj = prevWorld3; } } catch (Exception e) { FLRenderHelper.clearTessellator();