Update IronChests to the latest Forge Version, and fix some code issues.
This commit is contained in:
parent
a77f22eff4
commit
642cf07c5d
21
build.gradle
21
build.gradle
|
|
@ -5,13 +5,6 @@ buildscript {
|
||||||
jcenter()
|
jcenter()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
// This is only here while i'm activly developing FG, Remind me to remove when we publically release
|
|
||||||
configurations {
|
|
||||||
classpath.resolutionStrategy {
|
|
||||||
cacheDynamicVersionsFor 10, 'seconds'
|
|
||||||
cacheChangingModulesFor 0, 'seconds'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
|
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
|
||||||
}
|
}
|
||||||
|
|
@ -40,14 +33,22 @@ archivesBaseName = "ironchest"
|
||||||
|
|
||||||
minecraft {
|
minecraft {
|
||||||
mappings channel: 'snapshot', version: mappings_version
|
mappings channel: 'snapshot', version: mappings_version
|
||||||
|
|
||||||
runs {
|
runs {
|
||||||
client = {
|
client = {
|
||||||
workingDirectory = project.file("run").canonicalPath
|
// recommended logging data for a userdev environment
|
||||||
|
properties 'forge.logging.markers': 'SCAN,REGISTRIES,REGISTRYDUMP'
|
||||||
|
// recommended logging level for the console
|
||||||
|
properties 'forge.logging.console.level': 'debug'
|
||||||
|
workingDirectory project.file('run').canonicalPath
|
||||||
source sourceSets.main
|
source sourceSets.main
|
||||||
}
|
}
|
||||||
server = {
|
server = {
|
||||||
workingDirectory = project.file("run").canonicalPath
|
// recommended logging data for a userdev environment
|
||||||
|
properties 'forge.logging.markers': 'SCAN,REGISTRIES,REGISTRYDUMP'
|
||||||
|
// recommended logging level for the console
|
||||||
|
properties 'forge.logging.console.level': 'debug'
|
||||||
|
workingDirectory project.file('run').canonicalPath
|
||||||
source sourceSets.main
|
source sourceSets.main
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ minecraft_version=1.13
|
||||||
minecraft_version_toml=13
|
minecraft_version_toml=13
|
||||||
|
|
||||||
# Forge Version Information
|
# Forge Version Information
|
||||||
forge_version=24.0.96-1.13-pre
|
forge_version=24.0.156-1.13-pre
|
||||||
forge_version_toml=24
|
forge_version_toml=24
|
||||||
forge_group=net.minecraftforge.test
|
forge_group=net.minecraftforge.test
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ public class TileEntityIronChestRenderer<T extends TileEntity & IChestLid> exten
|
||||||
|
|
||||||
IBlockState iBlockState = tileEntity.hasWorld() ?
|
IBlockState iBlockState = tileEntity.hasWorld() ?
|
||||||
tileEntity.getBlockState() :
|
tileEntity.getBlockState() :
|
||||||
(IBlockState) tileEntity.getBlockToUse().getDefaultState().with(BlockChest.FACING, EnumFacing.SOUTH);
|
(IBlockState) tileEntity.getBlockToUse().getDefaultState().with(BlockChest.FACING, EnumFacing.NORTH);
|
||||||
IronChestType chestType = IronChestType.IRON;
|
IronChestType chestType = IronChestType.IRON;
|
||||||
IronChestType typeNew = BlockChest.getTypeFromBlock(iBlockState.getBlock());
|
IronChestType typeNew = BlockChest.getTypeFromBlock(iBlockState.getBlock());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
public abstract class BlockChest extends Block implements ITileEntityProvider
|
public abstract class BlockChest extends Block
|
||||||
{
|
{
|
||||||
public static final DirectionProperty FACING = BlockHorizontal.HORIZONTAL_FACING;
|
public static final DirectionProperty FACING = BlockHorizontal.HORIZONTAL_FACING;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,10 +27,4 @@ public class BlockCopperChest extends BlockChest
|
||||||
{
|
{
|
||||||
return new TileEntityCopperChest();
|
return new TileEntityCopperChest();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public TileEntity createNewTileEntity(IBlockReader worldIn)
|
|
||||||
{
|
|
||||||
return new TileEntityCopperChest();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,10 +27,4 @@ public class BlockCrystalChest extends BlockChest
|
||||||
{
|
{
|
||||||
return new TileEntityCrystalChest();
|
return new TileEntityCrystalChest();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public TileEntity createNewTileEntity(IBlockReader worldIn)
|
|
||||||
{
|
|
||||||
return new TileEntityCrystalChest();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,10 +28,4 @@ public class BlockDiamondChest extends BlockChest
|
||||||
return new TileEntityDiamondChest();
|
return new TileEntityDiamondChest();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public TileEntity createNewTileEntity(IBlockReader worldIn)
|
|
||||||
{
|
|
||||||
return new TileEntityDiamondChest();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,10 +42,4 @@ public class BlockDirtChest extends BlockChest
|
||||||
{
|
{
|
||||||
return new TileEntityDirtChest();
|
return new TileEntityDirtChest();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public TileEntity createNewTileEntity(IBlockReader worldIn)
|
|
||||||
{
|
|
||||||
return new TileEntityDirtChest();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,10 +28,4 @@ public class BlockGoldChest extends BlockChest
|
||||||
return new TileEntityGoldChest();
|
return new TileEntityGoldChest();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public TileEntity createNewTileEntity(IBlockReader worldIn)
|
|
||||||
{
|
|
||||||
return new TileEntityGoldChest();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,11 +27,4 @@ public class BlockIronChest extends BlockChest
|
||||||
{
|
{
|
||||||
return new TileEntityIronChest();
|
return new TileEntityIronChest();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public TileEntity createNewTileEntity(IBlockReader worldIn)
|
|
||||||
{
|
|
||||||
return new TileEntityIronChest();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,10 +27,4 @@ public class BlockObsidianChest extends BlockChest
|
||||||
{
|
{
|
||||||
return new TileEntityObsidianChest();
|
return new TileEntityObsidianChest();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public TileEntity createNewTileEntity(IBlockReader worldIn)
|
|
||||||
{
|
|
||||||
return new TileEntityObsidianChest();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,10 +27,4 @@ public class BlockSilverChest extends BlockChest
|
||||||
{
|
{
|
||||||
return new TileEntitySilverChest();
|
return new TileEntitySilverChest();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public TileEntity createNewTileEntity(IBlockReader worldIn)
|
|
||||||
{
|
|
||||||
return new TileEntitySilverChest();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,8 @@ public class PacketTopStackSyncChest
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ctx.get().setPacketHandled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,12 +14,14 @@ import com.mojang.datafixers.DataFixUtils;
|
||||||
import com.mojang.datafixers.types.Type;
|
import com.mojang.datafixers.types.Type;
|
||||||
import cpw.mods.ironchest.IronChest;
|
import cpw.mods.ironchest.IronChest;
|
||||||
import cpw.mods.ironchest.common.util.TileEntityNames;
|
import cpw.mods.ironchest.common.util.TileEntityNames;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.tileentity.TileEntityType;
|
import net.minecraft.tileentity.TileEntityType;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.SharedConstants;
|
import net.minecraft.util.SharedConstants;
|
||||||
import net.minecraft.util.datafix.DataFixesManager;
|
import net.minecraft.util.datafix.DataFixesManager;
|
||||||
import net.minecraft.util.datafix.TypeReferences;
|
import net.minecraft.util.datafix.TypeReferences;
|
||||||
|
import net.minecraftforge.event.AttachCapabilitiesEvent;
|
||||||
import net.minecraftforge.event.RegistryEvent;
|
import net.minecraftforge.event.RegistryEvent;
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@
|
||||||
package cpw.mods.ironchest.common.tileentity;
|
package cpw.mods.ironchest.common.tileentity;
|
||||||
|
|
||||||
import cpw.mods.ironchest.common.blocks.BlockChest;
|
import cpw.mods.ironchest.common.blocks.BlockChest;
|
||||||
import cpw.mods.ironchest.common.blocks.BlockIronChest;
|
|
||||||
import cpw.mods.ironchest.common.blocks.IronChestType;
|
import cpw.mods.ironchest.common.blocks.IronChestType;
|
||||||
import cpw.mods.ironchest.common.core.IronChestBlocks;
|
import cpw.mods.ironchest.common.core.IronChestBlocks;
|
||||||
import cpw.mods.ironchest.common.gui.ContainerIronChest;
|
import cpw.mods.ironchest.common.gui.ContainerIronChest;
|
||||||
|
|
@ -291,7 +290,7 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements IChes
|
||||||
{
|
{
|
||||||
Block block = this.getBlockState().getBlock();
|
Block block = this.getBlockState().getBlock();
|
||||||
|
|
||||||
if (block instanceof BlockIronChest)
|
if (block instanceof BlockChest)
|
||||||
{
|
{
|
||||||
this.world.addBlockEvent(this.pos, block, 1, this.numPlayersUsing);
|
this.world.addBlockEvent(this.pos, block, 1, this.numPlayersUsing);
|
||||||
this.world.notifyNeighborsOfStateChange(this.pos, block);
|
this.world.notifyNeighborsOfStateChange(this.pos, block);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue