mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-20 12:20:11 +00:00
Comment out test Mod/EventBusSubscriber annotations, fix up ModelLoaderRegistryTest
This commit is contained in:
1 parent
de14670d4d
commit
e482793f69
125 files changed
+369
-583
No files matched your search
@@ -43,7 +43,7 @@ import java.util.function.Function;
|
||||
/**
|
||||
* Test for {@link TextureStitchEvent.Pre}.
|
||||
*/
|
||||
@Mod(modid = CustomTextureAtlasSpriteTest.MOD_ID, name = CustomTextureAtlasSpriteTest.NAME, version = "1.0", clientSideOnly = true)
|
||||
//@Mod(modid = CustomTextureAtlasSpriteTest.MOD_ID, name = CustomTextureAtlasSpriteTest.NAME, version = "1.0", clientSideOnly = true)
|
||||
public class CustomTextureAtlasSpriteTest
|
||||
{
|
||||
static final String MOD_ID = "custom_sprite_test";
|
||||
@@ -51,7 +51,7 @@ public class CustomTextureAtlasSpriteTest
|
||||
private static Logger logger;
|
||||
|
||||
|
||||
@Mod.EventBusSubscriber(modid = MOD_ID)
|
||||
//@Mod.EventBusSubscriber(modid = MOD_ID)
|
||||
public static class Registration
|
||||
{
|
||||
@net.minecraftforge.eventbus.api.SubscribeEvent
|
||||
|
||||
@@ -30,7 +30,7 @@ import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
/**
|
||||
* Simple mod to test fov modifier.
|
||||
*/
|
||||
@Mod(modid = "fovmodifiertest", name = "FOV Modifier Test", version = "0.0.0", clientSideOnly = true)
|
||||
//@Mod(modid = "fovmodifiertest", name = "FOV Modifier Test", version = "0.0.0", clientSideOnly = true)
|
||||
public class FOVModifierEventTest
|
||||
{
|
||||
static final boolean ENABLED = false;
|
||||
|
||||
@@ -28,7 +28,7 @@ import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
|
||||
@Mod(modid = SearchableCreativeTabTest.MODID, name = "Debug Search Tab", version = "1.0", acceptableRemoteVersions = "*")
|
||||
//@Mod(modid = SearchableCreativeTabTest.MODID, name = "Debug Search Tab", version = "1.0", acceptableRemoteVersions = "*")
|
||||
public class SearchableCreativeTabTest
|
||||
{
|
||||
public static final String MODID = "debugsearchtab";
|
||||
|
||||
+2
-2
@@ -30,8 +30,8 @@ import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
|
||||
@EventBusSubscriber(Side.CLIENT)
|
||||
@Mod (modid = "guicontainereventtest", name = "GuiContainer Event Tests!", version = "1.0", acceptableRemoteVersions = "*")
|
||||
//@EventBusSubscriber(Side.CLIENT)
|
||||
//@Mod(modid = "guicontainereventtest", name = "GuiContainer Event Tests!", version = "1.0", acceptableRemoteVersions = "*")
|
||||
public class ContainerDrawForegroundEventTest
|
||||
{
|
||||
static final boolean ENABLED = false;
|
||||
|
||||
@@ -27,7 +27,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@Mod(modid = TooltipColorEventTest.MODID, name = "Tooltip Color Test", version = "0.1", clientSideOnly = true)
|
||||
//@Mod(modid = TooltipColorEventTest.MODID, name = "Tooltip Color Test", version = "0.1", clientSideOnly = true)
|
||||
public class TooltipColorEventTest
|
||||
{
|
||||
public static final String MODID = "tooltipcolortest";
|
||||
|
||||
@@ -81,7 +81,7 @@ import org.apache.logging.log4j.Logger;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@Mod(modid = AnimatedModelTest.MODID, name = "ForgeDebugModelAnimation", version = AnimatedModelTest.VERSION, acceptableRemoteVersions = "*")
|
||||
//@Mod(modid = AnimatedModelTest.MODID, name = "ForgeDebugModelAnimation", version = AnimatedModelTest.VERSION, acceptableRemoteVersions = "*")
|
||||
public class AnimatedModelTest
|
||||
{
|
||||
public static final String MODID = "forgedebugmodelanimation";
|
||||
@@ -107,7 +107,7 @@ public class AnimatedModelTest
|
||||
private static Logger logger;
|
||||
|
||||
|
||||
@Mod.EventBusSubscriber(modid = MODID)
|
||||
//@Mod.EventBusSubscriber(modid = MODID)
|
||||
public static class Registration
|
||||
{
|
||||
@net.minecraftforge.eventbus.api.SubscribeEvent
|
||||
@@ -283,7 +283,7 @@ public class AnimatedModelTest
|
||||
|
||||
public static class ServerProxy extends CommonProxy {}
|
||||
|
||||
@Mod.EventBusSubscriber(value = Side.CLIENT, modid = MODID)
|
||||
//@Mod.EventBusSubscriber(value = Side.CLIENT, modid = MODID)
|
||||
public static class ClientProxy extends CommonProxy
|
||||
{
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ import net.minecraftforge.client.model.IModel;
|
||||
import net.minecraftforge.client.model.ModelLoaderRegistry;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
|
||||
@Mod(modid = BlockstateRetextureTest.MODID, name = "BlockstateRetextureTest", version = BlockstateRetextureTest.VERSION, acceptableRemoteVersions = "*", clientSideOnly = true)
|
||||
//@Mod(modid = BlockstateRetextureTest.MODID, name = "BlockstateRetextureTest", version = BlockstateRetextureTest.VERSION, acceptableRemoteVersions = "*", clientSideOnly = true)
|
||||
public class BlockstateRetextureTest
|
||||
{
|
||||
public static final String MODID = "forge_blockstate_retexture_test";
|
||||
@@ -53,7 +53,7 @@ public class BlockstateRetextureTest
|
||||
return Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(location.toString());
|
||||
};
|
||||
|
||||
@Mod.EventBusSubscriber(modid = MODID, value = Side.CLIENT)
|
||||
//@Mod.EventBusSubscriber(modid = MODID, value = Side.CLIENT)
|
||||
public static class ClientEvents
|
||||
{
|
||||
@net.minecraftforge.eventbus.api.SubscribeEvent
|
||||
|
||||
@@ -40,8 +40,8 @@ import net.minecraftforge.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
@Mod(modid = ForgeBlockStatesLoaderTest.MODID, name = "ForgeBlockStatesLoader", version = "1.0", acceptableRemoteVersions = "*")
|
||||
@Mod.EventBusSubscriber
|
||||
//@Mod(modid = ForgeBlockStatesLoaderTest.MODID, name = "ForgeBlockStatesLoader", version = "1.0", acceptableRemoteVersions = "*")
|
||||
//@Mod.EventBusSubscriber
|
||||
public class ForgeBlockStatesLoaderTest
|
||||
{
|
||||
public static final String MODID = "forgeblockstatesloader";
|
||||
@@ -82,7 +82,7 @@ public class ForgeBlockStatesLoaderTest
|
||||
|
||||
//public static final Block blockCustom = new CustomMappedBlock();
|
||||
|
||||
@Mod.EventBusSubscriber(value = Side.CLIENT, modid = MODID)
|
||||
//@Mod.EventBusSubscriber(value = Side.CLIENT, modid = MODID)
|
||||
public static class ClientEventHandler
|
||||
{
|
||||
@net.minecraftforge.eventbus.api.SubscribeEvent
|
||||
|
||||
@@ -40,7 +40,7 @@ import net.minecraftforge.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Random;
|
||||
|
||||
@Mod(modid = ItemLayerModelTest.MODID, name = "ForgeDebugItemLayerModel", version = ItemLayerModelTest.VERSION, acceptableRemoteVersions = "*")
|
||||
//@Mod(modid = ItemLayerModelTest.MODID, name = "ForgeDebugItemLayerModel", version = ItemLayerModelTest.VERSION, acceptableRemoteVersions = "*")
|
||||
public class ItemLayerModelTest
|
||||
{
|
||||
public static final String MODID = "forgedebugitemlayermodel";
|
||||
@@ -48,7 +48,7 @@ public class ItemLayerModelTest
|
||||
@ObjectHolder("test_item")
|
||||
public static final Item TEST_ITEM = null;
|
||||
|
||||
@Mod.EventBusSubscriber(modid = MODID)
|
||||
//@Mod.EventBusSubscriber(modid = MODID)
|
||||
public static class Registration
|
||||
{
|
||||
@SubscribeEvent
|
||||
|
||||
@@ -33,8 +33,8 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
|
||||
@Mod.EventBusSubscriber
|
||||
@Mod(modid = ItemModelConflictTest.MODID, name = "Test mod for model conflicts", version = "1.0", acceptableRemoteVersions = "*")
|
||||
//@Mod.EventBusSubscriber
|
||||
//@Mod(modid = ItemModelConflictTest.MODID, name = "Test mod for model conflicts", version = "1.0", acceptableRemoteVersions = "*")
|
||||
public class ItemModelConflictTest
|
||||
{
|
||||
public static final String MODID = "item_model_conflict_test";
|
||||
@@ -69,7 +69,7 @@ public class ItemModelConflictTest
|
||||
);
|
||||
}
|
||||
|
||||
@Mod.EventBusSubscriber(modid = MODID, value = Side.CLIENT)
|
||||
//@Mod.EventBusSubscriber(modid = MODID, value = Side.CLIENT)
|
||||
public static class ClientEventHandler
|
||||
{
|
||||
@SubscribeEvent
|
||||
|
||||
@@ -30,8 +30,8 @@ import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
|
||||
@Mod.EventBusSubscriber
|
||||
@Mod(modid = ItemModelGenerationTest.MOD_ID, name = "Item model generation test", version = "1.0", acceptableRemoteVersions = "*")
|
||||
//@Mod.EventBusSubscriber
|
||||
//@Mod(modid = ItemModelGenerationTest.MOD_ID, name = "Item model generation test", version = "1.0", acceptableRemoteVersions = "*")
|
||||
public class ItemModelGenerationTest
|
||||
{
|
||||
static final String MOD_ID = "item_model_generation_test";
|
||||
@@ -78,7 +78,7 @@ public class ItemModelGenerationTest
|
||||
);
|
||||
}
|
||||
|
||||
@Mod.EventBusSubscriber(modid = MOD_ID, value = Side.CLIENT)
|
||||
//@Mod.EventBusSubscriber(modid = MOD_ID, value = Side.CLIENT)
|
||||
public static class ClientEventHandler
|
||||
{
|
||||
@net.minecraftforge.eventbus.api.SubscribeEvent
|
||||
|
||||
@@ -68,7 +68,7 @@ import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Mod(modid = ModelBakeEventTest.MODID, name = "ForgeDebugModelBakeEvent", version = ModelBakeEventTest.VERSION, acceptableRemoteVersions = "*")
|
||||
//@Mod(modid = ModelBakeEventTest.MODID, name = "ForgeDebugModelBakeEvent", version = ModelBakeEventTest.VERSION, acceptableRemoteVersions = "*")
|
||||
public class ModelBakeEventTest
|
||||
{
|
||||
public static final String MODID = "forgedebugmodelbakeevent";
|
||||
@@ -95,7 +95,7 @@ public class ModelBakeEventTest
|
||||
}
|
||||
}
|
||||
|
||||
@Mod.EventBusSubscriber(modid = MODID)
|
||||
//@Mod.EventBusSubscriber(modid = MODID)
|
||||
public static class Registration
|
||||
{
|
||||
@SubscribeEvent
|
||||
@@ -112,7 +112,7 @@ public class ModelBakeEventTest
|
||||
}
|
||||
}
|
||||
|
||||
@Mod.EventBusSubscriber(value = Side.CLIENT, modid = MODID)
|
||||
//@Mod.EventBusSubscriber(value = Side.CLIENT, modid = MODID)
|
||||
public static class BakeEventHandler
|
||||
{
|
||||
@SubscribeEvent
|
||||
|
||||
@@ -41,7 +41,7 @@ import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
|
||||
@Mod(modid = ModelFluidTest.MODID, name = "ForgeDebugModelFluid", version = ModelFluidTest.VERSION, acceptableRemoteVersions = "*")
|
||||
//@Mod(modid = ModelFluidTest.MODID, name = "ForgeDebugModelFluid", version = ModelFluidTest.VERSION, acceptableRemoteVersions = "*")
|
||||
public class ModelFluidTest
|
||||
{
|
||||
public static final String MODID = "forgedebugmodelfluid";
|
||||
@@ -70,7 +70,7 @@ public class ModelFluidTest
|
||||
public static final Fluid GAS = new TestGas();
|
||||
|
||||
|
||||
@Mod.EventBusSubscriber(modid = MODID)
|
||||
//@Mod.EventBusSubscriber(modid = MODID)
|
||||
public static class Registration
|
||||
{
|
||||
@SubscribeEvent
|
||||
@@ -105,7 +105,7 @@ public class ModelFluidTest
|
||||
}
|
||||
}
|
||||
|
||||
@Mod.EventBusSubscriber(value = Side.CLIENT, modid = MODID)
|
||||
//@Mod.EventBusSubscriber(value = Side.CLIENT, modid = MODID)
|
||||
public static class ClientEventHandler
|
||||
{
|
||||
@SubscribeEvent
|
||||
|
||||
+156
-292
@@ -19,66 +19,65 @@
|
||||
|
||||
package net.minecraftforge.debug.client.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import com.google.common.collect.UnmodifiableIterator;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.ITileEntityProvider;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.IProperty;
|
||||
import net.minecraft.block.properties.PropertyBool;
|
||||
import net.minecraft.block.properties.PropertyDirection;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.model.ModelResourceLocation;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.ITickable;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.ModelRegistryEvent;
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.client.model.b3d.B3DLoader;
|
||||
import net.minecraftforge.client.model.obj.OBJLoader;
|
||||
import net.minecraftforge.common.model.IModelPart;
|
||||
import net.minecraftforge.common.model.IModelState;
|
||||
import net.minecraftforge.common.model.Models;
|
||||
import net.minecraftforge.common.model.TRSRTransformation;
|
||||
import net.minecraftforge.common.property.ExtendedBlockState;
|
||||
import net.minecraftforge.common.property.IExtendedBlockState;
|
||||
import net.minecraftforge.common.property.IUnlistedProperty;
|
||||
import net.minecraftforge.common.property.Properties;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.Mod.EventHandler;
|
||||
import net.minecraftforge.fml.event.FMLPreInitializationEvent;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import javax.vecmath.AxisAngle4d;
|
||||
import javax.vecmath.Matrix4f;
|
||||
import javax.vecmath.Quat4f;
|
||||
import javax.vecmath.Vector3d;
|
||||
import javax.vecmath.Vector4f;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Mod(modid = ModelLoaderRegistryTest.MODID, name = "ForgeDebugModelLoaderRegistry", version = ModelLoaderRegistryTest.VERSION, acceptableRemoteVersions = "*")
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import com.google.common.collect.UnmodifiableIterator;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.BlockItemUseContext;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.state.BooleanProperty;
|
||||
import net.minecraft.state.DirectionProperty;
|
||||
import net.minecraft.state.StateContainer;
|
||||
import net.minecraft.state.StateContainer.Builder;
|
||||
import net.minecraft.state.properties.BlockStateProperties;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.ITickable;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.ModelRegistryEvent;
|
||||
import net.minecraftforge.client.model.b3d.B3DLoader;
|
||||
import net.minecraftforge.client.model.obj.OBJLoader;
|
||||
import net.minecraftforge.common.model.IModelPart;
|
||||
import net.minecraftforge.common.model.IModelState;
|
||||
import net.minecraftforge.common.model.Models;
|
||||
import net.minecraftforge.common.model.TRSRTransformation;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
import net.minecraftforge.registries.ObjectHolder;
|
||||
|
||||
@Mod(ModelLoaderRegistryTest.MODID)
|
||||
public class ModelLoaderRegistryTest
|
||||
{
|
||||
public static final boolean ENABLED = false;
|
||||
public static final boolean ENABLED = true;
|
||||
public static final String MODID = "forgedebugmodelloaderregistry";
|
||||
public static final String VERSION = "1.0";
|
||||
private static Logger logger;
|
||||
@@ -99,18 +98,28 @@ public class ModelLoaderRegistryTest
|
||||
public static final Block DYNAMIC_EYE = null;
|
||||
@ObjectHolder(OBJCustomDataBlock.name)
|
||||
public static final Block CUSTOM_DATA = null;
|
||||
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event)
|
||||
|
||||
@ObjectHolder(OBJTesseractBlock.name)
|
||||
public static final TileEntityType<OBJTesseractTileEntity> TESSERACT_TILE = null;
|
||||
@ObjectHolder(OBJVertexColoring2.name)
|
||||
public static final TileEntityType<OBJVertexColoring2TileEntity> VERTEX_COLOR_2_TILE = null;
|
||||
|
||||
public ModelLoaderRegistryTest()
|
||||
{
|
||||
if (!ENABLED)
|
||||
return;
|
||||
|
||||
logger = event.getModLog();
|
||||
logger = LogManager.getLogger();
|
||||
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setupClient);
|
||||
}
|
||||
|
||||
private void setupClient(FMLClientSetupEvent event)
|
||||
{
|
||||
B3DLoader.INSTANCE.addDomain(MODID);
|
||||
OBJLoader.INSTANCE.addDomain(MODID);
|
||||
}
|
||||
|
||||
|
||||
@Mod.EventBusSubscriber(modid = MODID)
|
||||
@Mod.EventBusSubscriber(modid = MODID, bus = Bus.MOD)
|
||||
public static class Registration
|
||||
{
|
||||
@net.minecraftforge.eventbus.api.SubscribeEvent
|
||||
@@ -128,8 +137,14 @@ public class ModelLoaderRegistryTest
|
||||
//new OBJDynamicEye(),
|
||||
new OBJCustomDataBlock()
|
||||
);
|
||||
GameRegistry.registerTileEntity(OBJTesseractTileEntity.class, OBJTesseractBlock.name);
|
||||
GameRegistry.registerTileEntity(OBJVertexColoring2TileEntity.class, OBJVertexColoring2.name);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void registerTileEntities(RegistryEvent.Register<TileEntityType<?>> event)
|
||||
{
|
||||
event.getRegistry().registerAll(
|
||||
new TileEntityType<>(OBJTesseractTileEntity::new, null).setRegistryName(OBJTesseractBlock.name),
|
||||
new TileEntityType<>(OBJVertexColoring2TileEntity::new, null).setRegistryName(OBJVertexColoring2.name));
|
||||
//GameRegistry.registerTileEntity(OBJDynamicEyeTileEntity.class, OBJDynamicEye.name);
|
||||
}
|
||||
|
||||
@@ -149,7 +164,7 @@ public class ModelLoaderRegistryTest
|
||||
CUSTOM_DATA
|
||||
};
|
||||
for (Block block : blocks)
|
||||
event.getRegistry().register(new ItemBlock(block).setRegistryName(block.getRegistryName()));
|
||||
event.getRegistry().register(new ItemBlock(block, new Item.Properties().group(ItemGroup.BUILDING_BLOCKS)).setRegistryName(block.getRegistryName()));
|
||||
}
|
||||
|
||||
@net.minecraftforge.eventbus.api.SubscribeEvent
|
||||
@@ -169,32 +184,22 @@ public class ModelLoaderRegistryTest
|
||||
//DYNAMIC_EYE,
|
||||
CUSTOM_DATA
|
||||
};
|
||||
for (Block block : blocks)
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), "inventory"));
|
||||
}
|
||||
}
|
||||
|
||||
public static class CustomModelBlock extends Block
|
||||
{
|
||||
public static final PropertyDirection FACING = PropertyDirection.create("facing");
|
||||
public static final DirectionProperty FACING = BlockStateProperties.FACING;
|
||||
public static final String name = "custom_model_block";
|
||||
private int counter = 1;
|
||||
|
||||
private CustomModelBlock()
|
||||
{
|
||||
super(Material.IRON);
|
||||
this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
|
||||
setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
|
||||
setUnlocalizedName(MODID + ":" + name);
|
||||
super(Properties.create(Material.IRON));
|
||||
this.setDefaultState(this.getStateContainer().getBaseState().with(FACING, EnumFacing.NORTH));
|
||||
setRegistryName(new ResourceLocation(MODID, name));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube(IBlockState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFullCube(IBlockState state)
|
||||
{
|
||||
@@ -208,33 +213,21 @@ public class ModelLoaderRegistryTest
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
|
||||
public IBlockState getStateForPlacement(BlockItemUseContext context)
|
||||
{
|
||||
return this.getDefaultState().withProperty(FACING, getFacingFromEntity(world, pos, placer));
|
||||
return this.getDefaultState().with(FACING, context.getPlacementHorizontalFacing().getOpposite());
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getDefaultState().withProperty(FACING, EnumFacing.getFront(meta));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state)
|
||||
{
|
||||
return state.getValue(FACING).getIndex();
|
||||
}
|
||||
|
||||
@Override
|
||||
/* @Override
|
||||
public IBlockState getExtendedState(IBlockState state, IBlockAccess world, BlockPos pos)
|
||||
{
|
||||
//Only return an IExtendedBlockState from this method and createState(), otherwise block placement might break!
|
||||
B3DLoader.B3DState newState = new B3DLoader.B3DState(null, counter);
|
||||
return ((IExtendedBlockState) state).withProperty(Properties.AnimationProperty, newState);
|
||||
}
|
||||
|
||||
*/
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ)
|
||||
public boolean onBlockActivated(IBlockState state, World world, BlockPos pos, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
if (world.isRemote)
|
||||
{
|
||||
@@ -254,29 +247,9 @@ public class ModelLoaderRegistryTest
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockStateContainer createBlockState()
|
||||
public void fillStateContainer(StateContainer.Builder<Block, IBlockState> builder)
|
||||
{
|
||||
return new ExtendedBlockState(this, new IProperty[]{FACING}, new IUnlistedProperty[]{Properties.AnimationProperty});
|
||||
}
|
||||
|
||||
public static EnumFacing getFacingFromEntity(World worldIn, BlockPos clickedBlock, EntityLivingBase entityIn)
|
||||
{
|
||||
if (MathHelper.abs((float) entityIn.posX - (float) clickedBlock.getX()) < 2.0F && MathHelper.abs((float) entityIn.posZ - (float) clickedBlock.getZ()) < 2.0F)
|
||||
{
|
||||
double d0 = entityIn.posY + (double) entityIn.getEyeHeight();
|
||||
|
||||
if (d0 - (double) clickedBlock.getY() > 2.0D)
|
||||
{
|
||||
return EnumFacing.UP;
|
||||
}
|
||||
|
||||
if ((double) clickedBlock.getY() - d0 > 0.0D)
|
||||
{
|
||||
return EnumFacing.DOWN;
|
||||
}
|
||||
}
|
||||
|
||||
return entityIn.getHorizontalFacing().getOpposite();
|
||||
builder.add(FACING);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -291,30 +264,28 @@ public class ModelLoaderRegistryTest
|
||||
* @author shadekiller666
|
||||
*
|
||||
*/
|
||||
public static class OBJTesseractBlock extends Block implements ITileEntityProvider
|
||||
public static class OBJTesseractBlock extends Block
|
||||
{
|
||||
public static final String name = "obj_tesseract_block";
|
||||
|
||||
private OBJTesseractBlock()
|
||||
{
|
||||
super(Material.IRON);
|
||||
setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
|
||||
setUnlocalizedName(MODID + ":" + name);
|
||||
super(Properties.create(Material.IRON));
|
||||
setRegistryName(new ResourceLocation(MODID, name));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World worldIn, int meta)
|
||||
public boolean hasTileEntity()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createTileEntity(IBlockState state, IBlockReader world)
|
||||
{
|
||||
return new OBJTesseractTileEntity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube(IBlockState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFullCube(IBlockState state)
|
||||
{
|
||||
@@ -328,7 +299,7 @@ public class ModelLoaderRegistryTest
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ)
|
||||
public boolean onBlockActivated(IBlockState state, World world, BlockPos pos, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
if (world.getTileEntity(pos) == null)
|
||||
{
|
||||
@@ -355,7 +326,7 @@ public class ModelLoaderRegistryTest
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
/* @Override
|
||||
public IBlockState getExtendedState(IBlockState state, IBlockAccess world, BlockPos pos)
|
||||
{
|
||||
if (world.getTileEntity(pos) != null && world.getTileEntity(pos) instanceof OBJTesseractTileEntity)
|
||||
@@ -364,13 +335,7 @@ public class ModelLoaderRegistryTest
|
||||
return ((IExtendedBlockState) state).withProperty(Properties.AnimationProperty, te.state);
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockStateContainer createBlockState()
|
||||
{
|
||||
return new ExtendedBlockState(this, new IProperty[0], new IUnlistedProperty[]{Properties.AnimationProperty});
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
public static class OBJTesseractTileEntity extends TileEntity
|
||||
@@ -402,6 +367,11 @@ public class ModelLoaderRegistryTest
|
||||
return Optional.empty();
|
||||
}
|
||||
};
|
||||
|
||||
public OBJTesseractTileEntity()
|
||||
{
|
||||
super(TESSERACT_TILE);
|
||||
}
|
||||
|
||||
public void increment()
|
||||
{
|
||||
@@ -415,7 +385,7 @@ public class ModelLoaderRegistryTest
|
||||
TextComponentString text = new TextComponentString("" + this.counter);
|
||||
if (this.world.isRemote)
|
||||
{
|
||||
Minecraft.getMinecraft().ingameGUI.getChatGUI().printChatMessage(text);
|
||||
Minecraft.getInstance().ingameGUI.getChatGUI().printChatMessage(text);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -431,7 +401,7 @@ public class ModelLoaderRegistryTest
|
||||
TextComponentString text = new TextComponentString("" + this.counter);
|
||||
if (this.world.isRemote)
|
||||
{
|
||||
Minecraft.getMinecraft().ingameGUI.getChatGUI().printChatMessage(text);
|
||||
Minecraft.getInstance().ingameGUI.getChatGUI().printChatMessage(text);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -457,18 +427,10 @@ public class ModelLoaderRegistryTest
|
||||
|
||||
private OBJVertexColoring1()
|
||||
{
|
||||
super(Material.IRON);
|
||||
setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
|
||||
setUnlocalizedName(name);
|
||||
super(Properties.create(Material.IRON));
|
||||
setRegistryName(new ResourceLocation(MODID, name));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube(IBlockState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFullCube(IBlockState state)
|
||||
{
|
||||
@@ -492,46 +454,26 @@ public class ModelLoaderRegistryTest
|
||||
*/
|
||||
public static class OBJDirectionEye extends Block
|
||||
{
|
||||
public static final PropertyDirection FACING = PropertyDirection.create("facing");
|
||||
public static final DirectionProperty FACING = BlockStateProperties.FACING;
|
||||
public static final String name = "obj_direction_eye";
|
||||
|
||||
private OBJDirectionEye()
|
||||
{
|
||||
super(Material.IRON);
|
||||
setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
|
||||
setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
|
||||
setUnlocalizedName(name);
|
||||
super(Properties.create(Material.IRON));
|
||||
setDefaultState(this.getStateContainer().getBaseState().with(FACING, EnumFacing.NORTH));
|
||||
setRegistryName(new ResourceLocation(MODID, name));
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
|
||||
public IBlockState getStateForPlacement(BlockItemUseContext context)
|
||||
{
|
||||
return this.getDefaultState().withProperty(FACING, getFacingFromEntity(world, pos, placer));
|
||||
return this.getDefaultState().with(FACING, context.getPlacementHorizontalFacing().getOpposite());
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta)
|
||||
public void fillStateContainer(StateContainer.Builder<Block, IBlockState> builder)
|
||||
{
|
||||
return this.getDefaultState().withProperty(FACING, EnumFacing.getFront(meta));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state)
|
||||
{
|
||||
return state.getValue(FACING).getIndex();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockStateContainer createBlockState()
|
||||
{
|
||||
return new BlockStateContainer(this, FACING);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube(IBlockState state)
|
||||
{
|
||||
return false;
|
||||
builder.add(FACING);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -545,26 +487,6 @@ public class ModelLoaderRegistryTest
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public static EnumFacing getFacingFromEntity(World worldIn, BlockPos clickedBlock, EntityLivingBase entityIn)
|
||||
{
|
||||
if (MathHelper.abs((float) entityIn.posX - (float) clickedBlock.getX()) < 2.0F && MathHelper.abs((float) entityIn.posZ - (float) clickedBlock.getZ()) < 2.0F)
|
||||
{
|
||||
double d0 = entityIn.posY + (double) entityIn.getEyeHeight();
|
||||
|
||||
if (d0 - (double) clickedBlock.getY() > 2.0D)
|
||||
{
|
||||
return EnumFacing.DOWN;
|
||||
}
|
||||
|
||||
if ((double) clickedBlock.getY() - d0 > 0.0D)
|
||||
{
|
||||
return EnumFacing.UP;
|
||||
}
|
||||
}
|
||||
|
||||
return entityIn.getHorizontalFacing();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -574,26 +496,30 @@ public class ModelLoaderRegistryTest
|
||||
* @author shadekiller666
|
||||
*
|
||||
*/
|
||||
public static class OBJVertexColoring2 extends Block implements ITileEntityProvider
|
||||
public static class OBJVertexColoring2 extends Block
|
||||
{
|
||||
public static final String name = "obj_vertex_coloring2";
|
||||
|
||||
private OBJVertexColoring2()
|
||||
{
|
||||
super(Material.IRON);
|
||||
setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
|
||||
setUnlocalizedName(name);
|
||||
super(Properties.create(Material.IRON));
|
||||
setRegistryName(new ResourceLocation(MODID, name));
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World worldIn, int meta)
|
||||
public boolean hasTileEntity(IBlockState state)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createTileEntity(IBlockState state, IBlockReader world)
|
||||
{
|
||||
return new OBJVertexColoring2TileEntity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ)
|
||||
public boolean onBlockActivated(IBlockState state, World world, BlockPos pos, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
if (world.getTileEntity(pos) != null && world.getTileEntity(pos) instanceof OBJVertexColoring2TileEntity)
|
||||
{
|
||||
@@ -611,9 +537,10 @@ public class ModelLoaderRegistryTest
|
||||
private List<Vector4f> colorList = new ArrayList<Vector4f>();
|
||||
private boolean hasFilledList = false;
|
||||
private boolean shouldIncrement = true;
|
||||
|
||||
|
||||
public OBJVertexColoring2TileEntity()
|
||||
{
|
||||
super(VERTEX_COLOR_2_TILE);
|
||||
}
|
||||
|
||||
public void cycleColors()
|
||||
@@ -678,24 +605,16 @@ public class ModelLoaderRegistryTest
|
||||
*/
|
||||
public static class OBJDirectionBlock extends Block
|
||||
{
|
||||
public static final PropertyDirection FACING = PropertyDirection.create("facing");
|
||||
public static final DirectionProperty FACING = BlockStateProperties.FACING;
|
||||
public static final String name = "obj_direction_block";
|
||||
|
||||
private OBJDirectionBlock()
|
||||
{
|
||||
super(Material.IRON);
|
||||
this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
|
||||
setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
|
||||
setUnlocalizedName(MODID + ":" + name);
|
||||
super(Properties.create(Material.IRON));
|
||||
this.setDefaultState(this.getStateContainer().getBaseState().with(FACING, EnumFacing.NORTH));
|
||||
setRegistryName(new ResourceLocation(MODID, name));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube(IBlockState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFullCube(IBlockState state)
|
||||
{
|
||||
@@ -709,47 +628,15 @@ public class ModelLoaderRegistryTest
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
|
||||
public IBlockState getStateForPlacement(BlockItemUseContext context)
|
||||
{
|
||||
return this.getDefaultState().withProperty(FACING, getFacingFromEntity(world, pos, placer));
|
||||
return this.getDefaultState().with(FACING, context.getPlacementHorizontalFacing().getOpposite());
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta)
|
||||
public void fillStateContainer(StateContainer.Builder<Block, IBlockState> builder)
|
||||
{
|
||||
return this.getDefaultState().withProperty(FACING, EnumFacing.getFront(meta));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state)
|
||||
{
|
||||
return state.getValue(FACING).getIndex();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockStateContainer createBlockState()
|
||||
{
|
||||
return new BlockStateContainer(this, FACING);
|
||||
}
|
||||
|
||||
public static EnumFacing getFacingFromEntity(World worldIn, BlockPos clickedBlock, EntityLivingBase entityIn)
|
||||
{
|
||||
if (MathHelper.abs((float) entityIn.posX - (float) clickedBlock.getX()) < 2.0F && MathHelper.abs((float) entityIn.posZ - (float) clickedBlock.getZ()) < 2.0F)
|
||||
{
|
||||
double d0 = entityIn.posY + (double) entityIn.getEyeHeight();
|
||||
|
||||
if (d0 - (double) clickedBlock.getY() > 2.0D)
|
||||
{
|
||||
return EnumFacing.UP;
|
||||
}
|
||||
|
||||
if ((double) clickedBlock.getY() - d0 > 0.0D)
|
||||
{
|
||||
return EnumFacing.DOWN;
|
||||
}
|
||||
}
|
||||
|
||||
return entityIn.getHorizontalFacing().getOpposite();
|
||||
builder.add(FACING);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -761,55 +648,41 @@ public class ModelLoaderRegistryTest
|
||||
*/
|
||||
public static class OBJCustomDataBlock extends Block
|
||||
{
|
||||
public static final PropertyBool NORTH = PropertyBool.create("north");
|
||||
public static final PropertyBool SOUTH = PropertyBool.create("south");
|
||||
public static final PropertyBool WEST = PropertyBool.create("west");
|
||||
public static final PropertyBool EAST = PropertyBool.create("east");
|
||||
public static final BooleanProperty NORTH = BooleanProperty.create("north");
|
||||
public static final BooleanProperty SOUTH = BooleanProperty.create("south");
|
||||
public static final BooleanProperty WEST = BooleanProperty.create("west");
|
||||
public static final BooleanProperty EAST = BooleanProperty.create("east");
|
||||
public static final String name = "obj_custom_data_block";
|
||||
|
||||
private OBJCustomDataBlock()
|
||||
{
|
||||
super(Material.IRON);
|
||||
this.setDefaultState(this.blockState.getBaseState().withProperty(NORTH, false).withProperty(SOUTH, false).withProperty(WEST, false).withProperty(EAST, false));
|
||||
setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
|
||||
setUnlocalizedName(MODID + ":" + name);
|
||||
super(Properties.create(Material.IRON));
|
||||
this.setDefaultState(this.getStateContainer().getBaseState().with(NORTH, false).with(SOUTH, false).with(WEST, false).with(EAST, false));
|
||||
setRegistryName(new ResourceLocation(MODID, name));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube(IBlockState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFullCube(IBlockState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public boolean canConnectTo(IBlockAccess world, BlockPos pos)
|
||||
public boolean canConnectTo(IBlockReader world, BlockPos pos)
|
||||
{
|
||||
Block block = world.getBlockState(pos).getBlock();
|
||||
return block instanceof OBJCustomDataBlock;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos)
|
||||
public IBlockState updatePostPlacement(IBlockState state, EnumFacing facing, IBlockState facingState, IWorld world, BlockPos pos, BlockPos facingPos)
|
||||
{
|
||||
return state.withProperty(NORTH, this.canConnectTo(world, pos.north())).withProperty(SOUTH, this.canConnectTo(world, pos.south())).withProperty(WEST, this.canConnectTo(world, pos.west())).withProperty(EAST, this.canConnectTo(world, pos.east()));
|
||||
return state.with(NORTH, this.canConnectTo(world, pos.north())).with(SOUTH, this.canConnectTo(world, pos.south())).with(WEST, this.canConnectTo(world, pos.west())).with(EAST, this.canConnectTo(world, pos.east()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockStateContainer createBlockState()
|
||||
protected void fillStateContainer(Builder<Block, IBlockState> builder)
|
||||
{
|
||||
return new BlockStateContainer(this, NORTH, SOUTH, WEST, EAST);
|
||||
builder.add(NORTH, SOUTH, WEST, EAST);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -819,30 +692,22 @@ public class ModelLoaderRegistryTest
|
||||
* @author shadekiller666
|
||||
*
|
||||
*/
|
||||
public static class OBJDynamicEye extends Block implements ITileEntityProvider
|
||||
public static class OBJDynamicEye extends Block
|
||||
{
|
||||
public static final String name = "obj_dynamic_eye";
|
||||
|
||||
private OBJDynamicEye()
|
||||
{
|
||||
super(Material.IRON);
|
||||
setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
|
||||
setUnlocalizedName(MODID + ":" + name);
|
||||
super(Properties.create(Material.IRON));
|
||||
setRegistryName(new ResourceLocation(MODID, name));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World worldIn, int meta)
|
||||
public TileEntity createTileEntity(IBlockState state, IBlockReader world)
|
||||
{
|
||||
return new OBJDynamicEyeTileEntity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube(IBlockState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFullCube(IBlockState state)
|
||||
{
|
||||
@@ -855,7 +720,7 @@ public class ModelLoaderRegistryTest
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
/* @Override
|
||||
public IBlockState getExtendedState(IBlockState state, IBlockAccess world, BlockPos pos)
|
||||
{
|
||||
if (world.getTileEntity(pos) != null && world.getTileEntity(pos) instanceof OBJDynamicEyeTileEntity)
|
||||
@@ -867,26 +732,25 @@ public class ModelLoaderRegistryTest
|
||||
}
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockStateContainer createBlockState()
|
||||
{
|
||||
return new ExtendedBlockState(this, new IProperty[0], new IUnlistedProperty[]{Properties.AnimationProperty});
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
public static class OBJDynamicEyeTileEntity extends TileEntity implements ITickable
|
||||
{
|
||||
public OBJDynamicEyeTileEntity()
|
||||
{
|
||||
super(null); // TODO
|
||||
}
|
||||
|
||||
private TRSRTransformation transform = TRSRTransformation.identity();
|
||||
|
||||
@Override
|
||||
public void update()
|
||||
public void tick()
|
||||
{
|
||||
if (this.world.isRemote)
|
||||
{
|
||||
Vector3d teLoc = new Vector3d(this.getPos().getX(), this.getPos().getY(), this.getPos().getZ());
|
||||
EntityPlayer player = Minecraft.getMinecraft().player;
|
||||
EntityPlayer player = Minecraft.getInstance().player;
|
||||
Vector3d playerLoc = new Vector3d();
|
||||
playerLoc.setX(player.posX);
|
||||
playerLoc.setY(player.posY + player.getEyeHeight());
|
||||
|
||||
@@ -35,7 +35,7 @@ import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
|
||||
@Mod(modid = MultiLayerModelTest.MODID, name = "ForgeDebugMultiLayerModel", version = MultiLayerModelTest.VERSION, acceptableRemoteVersions = "*")
|
||||
//@Mod(modid = MultiLayerModelTest.MODID, name = "ForgeDebugMultiLayerModel", version = MultiLayerModelTest.VERSION, acceptableRemoteVersions = "*")
|
||||
public class MultiLayerModelTest
|
||||
{
|
||||
private static final boolean ENABLED = true;
|
||||
@@ -47,7 +47,7 @@ public class MultiLayerModelTest
|
||||
@ObjectHolder(blockName)
|
||||
public static final Block TEST_BLOCK = null;
|
||||
|
||||
@Mod.EventBusSubscriber(modid = MODID)
|
||||
//@Mod.EventBusSubscriber(modid = MODID)
|
||||
public static class Registration
|
||||
{
|
||||
@net.minecraftforge.eventbus.api.SubscribeEvent
|
||||
|
||||
+3
-3
@@ -59,7 +59,7 @@ import net.minecraftforge.fml.event.FMLPreInitializationEvent;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
|
||||
@Mod(modid = FastTESRTransparentTest.MODID, name = "TransparentFastTESRTest", version = "1.0", acceptableRemoteVersions = "*")
|
||||
//@Mod(modid = FastTESRTransparentTest.MODID, name = "TransparentFastTESRTest", version = "1.0", acceptableRemoteVersions = "*")
|
||||
public class FastTESRTransparentTest
|
||||
{
|
||||
|
||||
@@ -214,7 +214,7 @@ public class FastTESRTransparentTest
|
||||
}
|
||||
};
|
||||
|
||||
@EventBusSubscriber
|
||||
//@EventBusSubscriber
|
||||
public static class BlockHolder
|
||||
{
|
||||
|
||||
@@ -253,7 +253,7 @@ public class FastTESRTransparentTest
|
||||
GameRegistry.registerTileEntity(TransparentFastTE.class, MODID + ":fast-tesr-te");
|
||||
}
|
||||
|
||||
@EventBusSubscriber(value = Side.CLIENT, modid = MODID)
|
||||
//@EventBusSubscriber(value = Side.CLIENT, modid = MODID)
|
||||
public static class ClientLoader
|
||||
{
|
||||
@net.minecraftforge.eventbus.api.SubscribeEvent
|
||||
|
||||
@@ -47,14 +47,14 @@ import net.minecraftforge.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
|
||||
import static org.lwjgl.opengl.GL11.*;
|
||||
|
||||
@Mod(modid = ItemTESRTest.MODID, name = "ForgeDebugItemTile", version = "1.0", acceptableRemoteVersions = "*")
|
||||
//@Mod(modid = ItemTESRTest.MODID, name = "ForgeDebugItemTile", version = "1.0", acceptableRemoteVersions = "*")
|
||||
public class ItemTESRTest
|
||||
{
|
||||
public static final String MODID = "forgedebugitemtile";
|
||||
@ObjectHolder(TestBlock.name)
|
||||
public static final Block TEST_BLOCK = null;
|
||||
|
||||
@Mod.EventBusSubscriber(modid = MODID)
|
||||
//@Mod.EventBusSubscriber(modid = MODID)
|
||||
public static class Registration
|
||||
{
|
||||
@net.minecraftforge.eventbus.api.SubscribeEvent
|
||||
@@ -71,7 +71,7 @@ public class ItemTESRTest
|
||||
}
|
||||
}
|
||||
|
||||
@Mod.EventBusSubscriber(value = Side.CLIENT, modid = MODID)
|
||||
//@Mod.EventBusSubscriber(value = Side.CLIENT, modid = MODID)
|
||||
public static class BakeEventHandler
|
||||
{
|
||||
@SubscribeEvent
|
||||
|
||||
@@ -36,7 +36,7 @@ import net.minecraftforge.fml.common.Mod.Instance;
|
||||
import net.minecraftforge.fml.event.FMLPreInitializationEvent;
|
||||
import net.minecraftforge.fml.common.registry.EntityRegistry;
|
||||
|
||||
@Mod(modid = "wrnormal", name = "WRNormal", version = "1.0", acceptableRemoteVersions = "*")
|
||||
//@Mod(modid = "wrnormal", name = "WRNormal", version = "1.0", acceptableRemoteVersions = "*")
|
||||
public class VertexBufferNormalTest
|
||||
{
|
||||
@Instance("wrnormal")
|
||||
|
||||
Reference in new issue
Block a user