mirror of
https://github.com/GTNewHorizons/Gadomancy.git
synced 2026-11-18 19:29:28 +00:00
Fixed Extended Aura nodes
This commit is contained in:
1 parent
ee0ab2c486
commit
10e7c3bd01
6 files changed
+30
-17
No files matched your search
@@ -24,6 +24,7 @@ import makeo.gadomancy.common.blocks.tiles.TileInfusionClaw;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileRemoteJar;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileStickyJar;
|
||||
import makeo.gadomancy.common.registration.RegisteredBlocks;
|
||||
import makeo.gadomancy.common.registration.RegisteredItems;
|
||||
import makeo.gadomancy.common.utils.Injector;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
@@ -37,6 +38,8 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import sun.reflect.generics.visitor.Reifier;
|
||||
import thaumcraft.api.nodes.INode;
|
||||
import thaumcraft.client.gui.GuiGolem;
|
||||
import thaumcraft.client.renderers.entity.RenderGolemBase;
|
||||
import thaumcraft.common.entities.golems.EntityGolemBase;
|
||||
@@ -59,6 +62,8 @@ public class ClientProxy extends CommonProxy {
|
||||
|
||||
@Override
|
||||
public void initalize() {
|
||||
super.initalize();
|
||||
|
||||
injectGolemTextures();
|
||||
|
||||
//Tiles
|
||||
@@ -83,14 +88,12 @@ public class ClientProxy extends CommonProxy {
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(RegisteredBlocks.blockInfusionClaw), new ItemRenderTileEntity(renderTileInfusionClaw, new TileInfusionClaw()));
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(RegisteredBlocks.blockNode), new ItemExNodeRenderer());
|
||||
MinecraftForgeClient.registerItemRenderer(RegisteredItems.itemBlockAiryCopy, new ItemExNodeRenderer());
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(RegisteredBlocks.blockRemoteJar), new ItemRenderRemoteJar(renderTileRemoteJar));
|
||||
|
||||
//Blocks
|
||||
RegisteredBlocks.rendererTransparentBlock = registerBlockRenderer(new RenderBlockTransparent());
|
||||
|
||||
super.initalize();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -9,16 +9,11 @@ import thaumcraft.client.renderers.tile.ItemNodeRenderer;
|
||||
* Gadomancy is Open Source and distributed under the
|
||||
* GNU LESSER GENERAL PUBLIC LICENSE
|
||||
* for more read the LICENSE file
|
||||
* <p/>
|
||||
*
|
||||
* Created by HellFirePvP @ 22.10.2015 20:11
|
||||
*/
|
||||
public class ItemExNodeRenderer extends ItemNodeRenderer {
|
||||
|
||||
public ItemExNodeRenderer() {
|
||||
//AspectList list = new AspectList().add(Aspect.FIRE, 100).add(Aspect.ENTROPY, 100).add(Aspect.WATER, 50);
|
||||
//new Injector(this).setField("aspects", list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
return (item != null) && (item.getItem() == Item.getItemFromBlock(RegisteredBlocks.blockNode)) && (item.getItemDamage() == 0);
|
||||
|
||||
@@ -3,6 +3,7 @@ package makeo.gadomancy.common;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import makeo.gadomancy.common.containers.ContainerInfusionClaw;
|
||||
import makeo.gadomancy.common.events.EventHandlerGolem;
|
||||
@@ -13,8 +14,11 @@ import makeo.gadomancy.common.registration.*;
|
||||
import makeo.gadomancy.client.ClientProxy;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import thaumcraft.common.blocks.BlockAiryItem;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.entities.golems.ContainerGolem;
|
||||
import thaumcraft.common.entities.golems.EntityGolemBase;
|
||||
|
||||
@@ -42,6 +46,15 @@ public class CommonProxy implements IGuiHandler {
|
||||
}
|
||||
|
||||
public void initalize() {
|
||||
try {
|
||||
RegisteredItems.itemBlockAiryCopy = new BlockAiryItem(RegisteredBlocks.blockNode);
|
||||
GameRegistry.addSubstitutionAlias("Thaumcraft:blockAiry", GameRegistry.Type.BLOCK, RegisteredBlocks.blockNode);
|
||||
GameRegistry.addSubstitutionAlias("Thaumcraft:blockAiry", GameRegistry.Type.ITEM, RegisteredItems.itemBlockAiryCopy);
|
||||
ConfigBlocks.blockAiry = RegisteredBlocks.blockNode;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
NetworkRegistry.INSTANCE.registerGuiHandler(Gadomancy.instance, this);
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(EVENT_HANDLER_GOLEM);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package makeo.gadomancy.common.blocks;
|
||||
|
||||
import makeo.gadomancy.common.blocks.tiles.TileExtendedNode;
|
||||
import makeo.gadomancy.common.registration.RegisteredItems;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -14,16 +13,15 @@ import net.minecraft.world.World;
|
||||
* Created by HellFirePvP @ 22.10.2015 19:47
|
||||
*/
|
||||
public class BlockNode extends thaumcraft.common.blocks.BlockAiry {
|
||||
//We overwrite and use the TC class for visual effects and world interact handling.
|
||||
//This way our node behaves like TC ones.
|
||||
|
||||
public BlockNode() {
|
||||
super();
|
||||
setCreativeTab(RegisteredItems.creativeTab);
|
||||
@Override
|
||||
public String getUnlocalizedName() {
|
||||
return super.getUnlocalizedName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createTileEntity(World world, int metadata) {
|
||||
return new TileExtendedNode();
|
||||
if(metadata == 0) return new TileExtendedNode();
|
||||
return super.createTileEntity(world, metadata);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package makeo.gadomancy.common.registration;
|
||||
|
||||
import cpw.mods.fml.common.registry.ExistingSubstitutionException;
|
||||
import cpw.mods.fml.common.registry.GameData;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import makeo.gadomancy.api.ClickBehavior;
|
||||
import makeo.gadomancy.common.blocks.BlockArcaneDropper;
|
||||
@@ -58,7 +60,7 @@ public class RegisteredBlocks {
|
||||
blockArcaneDropper = registerBlock(new BlockArcaneDropper());
|
||||
blockInfusionClaw = registerBlock(new BlockInfusionClaw());
|
||||
blockRemoteJar = registerBlock(new BlockRemoteJar(), ItemBlockRemoteJar.class);
|
||||
blockNode = registerBlock(new BlockNode());
|
||||
blockNode = (BlockNode) new BlockNode().setBlockName("blockAiry");
|
||||
}
|
||||
|
||||
private static <T extends Block> T registerBlock(String name, T block) {
|
||||
|
||||
@@ -32,6 +32,8 @@ public class RegisteredItems {
|
||||
public static Item itemTransformationFocus;
|
||||
public static Item itemGolemCoreBreak;
|
||||
|
||||
public static Item itemBlockAiryCopy; //!!!!!!!!!!DO NOT TOUCH THIS OR USE THIS ANYWHERE!!!!!!!!!!
|
||||
|
||||
public static void preInit() {
|
||||
creativeTab = new CreativeTabs(Gadomancy.MODID) {
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user