Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ buildscript {
}
apply plugin: 'net.minecraftforge.gradle.forge'

version = "0.0.3"
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.10.2-alpha"

Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
52 changes: 26 additions & 26 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
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;
Expand Down Expand Up @@ -48,7 +47,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) {
Expand All @@ -58,7 +57,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) {
Expand All @@ -68,7 +67,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) {
Expand All @@ -89,7 +88,7 @@ public static void moveEntity(Entity entity, double dx, double dy, double dz) {
}
}

List<AxisAlignedBB> list1 = entity.worldObj.getCollisionBoxes(entity, entity.getEntityBoundingBox().addCoord(dx, dy, dz));
List<AxisAlignedBB> list1 = entity.getEntityWorld().getCollisionBoxes(entity, entity.getEntityBoundingBox().addCoord(dx, dy, dz));
AxisAlignedBB axisalignedbb = entity.getEntityBoundingBox();
int i = 0;

Expand Down Expand Up @@ -121,7 +120,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<AxisAlignedBB> list = entity.worldObj.getCollisionBoxes(entity, entity.getEntityBoundingBox().addCoord(xspeed, dy, zpeed));
List<AxisAlignedBB> 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;
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/com/rwtema/funkylocomotion/FunkyLocomotion.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
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)
public class FunkyLocomotion {
public static final String MODID = "funkylocomotion";
public static final String VERSION = "1.0";
Expand Down Expand Up @@ -92,12 +92,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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class FunkyCapabilities {
public static Capability<IAdvStickyBlock> ADV_STICKY_BLOCK = null;

@CapabilityInject(IItemHandler.class)
public static void initializeCapabilities(Capability ignore) {
public static <T> void initializeCapabilities(Capability<T> ignore) {
register(IMoveCheck.class, () -> (worldObj, pos, profile) -> EnumActionResult.PASS);
register(IStickyBlock.class, () -> (world, pos, side) -> false);
register(ISlipperyBlock.class, () -> (world, pos, dir) -> false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;

import java.util.List;

public interface IAdvStickyBlock {
Iterable<BlockPos> getBlocksToMove(World world, BlockPos pos);
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,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, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) {
if (!worldIn.isRemote) {
ItemStack item = playerIn.getHeldItem(hand);
if (!(ItemHelper.isWrench(item)))
Expand All @@ -44,13 +45,15 @@ 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) {
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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public BlockFLMultiState(Material materialIn) {
@Override
public abstract int getMetaFromState(IBlockState state);

@SuppressWarnings("NullableProblems")
@Override
public abstract IBlockState getStateFromMeta(int meta);
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ public BlockFrame() {

@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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,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, ItemStack stack) {
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);
return getDefaultState().withProperty(BlockDirectional.FACING, facingFromEntity);
}
Expand All @@ -75,7 +76,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, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) {
if (!worldIn.isRemote) {
ItemStack item = playerIn.getHeldItem(hand);
if (!(ItemHelper.isWrench(item)))
Expand All @@ -90,6 +92,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);
Expand All @@ -105,6 +108,7 @@ public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state,
projector.facing = side;
BlockHelper.markBlockForUpdate(worldIn, pos);
}
return true;
}
}
return true;
Expand Down
14 changes: 8 additions & 6 deletions src/main/java/com/rwtema/funkylocomotion/blocks/BlockMoving.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,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<AxisAlignedBB> collidingBoxes, @Nullable Entity entityIn) {
public void addCollisionBoxToList(IBlockState state, @Nonnull World worldIn, @Nonnull BlockPos pos, @Nonnull AxisAlignedBB entityBox,
@Nonnull List<AxisAlignedBB> collidingBoxes, @Nullable Entity entityIn) {
TileEntity tile = worldIn.getTileEntity(pos);
if (!(tile instanceof TileMovingBase))
return;
Expand Down Expand Up @@ -112,7 +112,6 @@ 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) {
Expand Down Expand Up @@ -161,16 +160,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, @Nullable ItemStack heldItem, 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
Expand All @@ -184,6 +185,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;
Expand Down
Loading