Everything posted by Kaneka
-
[1.10.2][CLOSED]Creating Non Existing Blocks
That was how to render a block, I just want to draw lines to make crosses to mark some existing blocks. best would be examplecode, but thanks for xou effort till here
-
[1.10.2][CLOSED]Creating Non Existing Blocks
Just what I read in the tutorials about the "texture block" tutorial, but not that much
-
[1.10.2][CLOSED]Creating Non Existing Blocks
ok, thanks. Now I just need a tutorial or examplecode on how to make stuff render, cause all I found is just "how to texture blocks in 1.7", nothing about 1.10. I just need to render red crosses.
-
[1.10.2][CLOSED]Creating Non Existing Blocks
Is there a tutorial or a codeexample where I can see how to add rendering processes when pushing a button in a gui?
-
[1.10.2][CLOSED]Creating Non Existing Blocks
ok, thanks a lot!
-
[1.10.2][CLOSED]Creating Non Existing Blocks
The method addVertex isnt defined in the VertexBuffer class
-
[1.10.2][CLOSED]Creating Non Existing Blocks
I cant find the WorldRenderer, was it changed?
-
[1.10.2][CLOSED]Creating Non Existing Blocks
Ok, thanks for all the answers, I will have a look which idea fits my needs best!
-
[1.10.2][CLOSED]Creating Non Existing Blocks
Hi everyone, I am thinking of adding something more complicated and dont know how to do it. I want to add a non existing block which marks blocks that needs to be removed by the player, like clicking on a button and see which blocks need to be removed, that the tileentity have enought space to go on. Like marking the blocks, that needs to be removed with a red X or something like this. It should not change the blocks at all. Hope it is understandable. Thanks for your answers, Kaneka
-
[1.10.2] blockstate question
it works, thanks
-
[1.10.2] blockstate question
- [1.10.2] blockstate question
hello everyone, I created a block with PropertyInteger of 0 - 4, and almost everything works fine. But when leave the world and join again, the block is set on 4, dosn´t matter which value was there before. example: Before relog: anyblock:0 .After relog: anyblock:4 Which methods defines the value? thanks for the answer- [1.10] 3D model is 'x-ray' block
Just override the isFullyOpaque method: @Override public boolean isFullyOpaque(IBlockState state) { return false; } For my mod it works- 1.9 Right Click with Item Event
When the item is one of your modded items, override the onItemRightClick method, if it is a vanilla item, use the LivingEntityUseItemEvent here an example: public ActionResult<ItemStack> onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn, EnumHand hand) { if(worldIn.isRemote) { playerIn.openGui(Main.instance, Main.GUI_ENUM.YOURITEM.ordinal(), worldIn, (int)playerIn.posX, (int)playerIn.posY (int)playerIn.posZ); } } }- [1.9.4]Looking for one specific method
ok thanks- [1.9.4]Looking for one specific method
isnt there a event in the ItemArmor or Item class like there is the hitEntity for sword- [1.9.4]Looking for one specific method
When the player is attacked while wearing my armor, so it dosnt matter if there is unbreaking or not- [1.9.4]Looking for one specific method
Hi everyone, I look for a method in ItemArmor that is only called when the armor gets damage. Like there is the hitEntity for sword or onBlockdestroyed for tools. I looked for this methis a long time, but cant find it, can someone help me? Thanks for the answers Kaneka- [1.9.4]Loot Table
- [1.9.4]Loot Table
Thanks for the answer, is there a example?- [1.9.4]Loot Table
Hi everyone, I try to use loot_tables in my mod but get these error(I cant see how to fix this) here is the loot_table: { "pools": [ { "rolls": { "min": 2, "max": 4 }, "entries": [ { "type": "item", "name": "planttech:cookie_blue", "functions": [ { "function": "set_count", "count": { "min": 2, "max": 5 } } ], "weight": 25 }, { "type": "item", "name": "planttech:cookie_yellow", "functions": [ { "function": "set_count", "count": { "min": 2, "max": 5 } } ], "weight": 25 }, { "type": "item", "name": "planttech:cookie_pink", "functions": [ { "function": "set_count", "count": { "min": 2, "max": 5 } } ], "weight": 25 }, { "type": "item", "name": "planttech:cookie_red", "functions": [ { "function": "set_count", "count": { "min": 2, "max": 5 } } ], "weight": 25 }, { "type": "item", "name": "planttech:cookie_white", "functions": [ { "function": "set_count", "count": { "min": 2, "max": 5 } } ], "weight": 25 }, { "type": "item", "name": "planttech:metalblock", "functions": [ { "function": "set_count", "count": { "min": 2, "max": 5 } } ], "weight": 25 }, { "type": "item", "name": "planttech:plantwire", "functions": [ { "function": "set_count", "count": { "min": 10, "max": 25 } } ], "weight": 25 }, { "type": "item", "name": "planttech:crystal_diamond", "functions": [ { "function": "set_count", "count": { "min": 1, "max": 2 } } ], "weight": 15 } ] } ] }- [1.9]TE wont work as planned
Feeling so dump....it causes an exeption when trying to do writetoNBT cause controllercoordinates was null.... Thanks for the help jerryfisher- [1.9]TE wont work as planned
GameRegistry.registerTileEntity(TileEntitySolarPlant.class, "tileentitysolarplant"); it is like all my other are and these works fine. Thats what disturb me, everyone of my other TE works. And the compiler don´t tell me what I did wrong...then I could correct it....- [1.9]TE wont work as planned
Hi everyone, I am trying to add a solar plants that produces energy. But after a restart the already created energy is removed and until I click on the block, it wont produce energy(when I click on it after waiting a bit, it says "Energy 0/16000") Here is the code: Here the SolarPlant.class package net.kaneka.planttech.blocks.machines.energy.producer; import net.kaneka.planttech.Main; import net.kaneka.planttech.blocks.tileentities.TileEntityCompostBin; import net.kaneka.planttech.blocks.tileentities.energy.producer.TileEntityCreativeEnergyProducer; import net.kaneka.planttech.blocks.tileentities.energy.producer.TileEntitySolarPlant; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockRenderLayer; import net.minecraft.util.EnumBlockRenderType; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.minecraft.util.math.BlockPos; import net.minecraft.util.text.TextComponentString; import net.minecraft.util.text.TextFormatting; import net.minecraft.world.World; public class SolarPlant extends BlockContainer { public SolarPlant() { super(Material.wood); this.setUnlocalizedName("solarplant"); this.setCreativeTab(Main.planttech3); this.setHardness(0.5F); } @Override public TileEntity createNewTileEntity(World worldIn, int meta) { return new TileEntitySolarPlant(); } @Override public EnumBlockRenderType getRenderType(IBlockState state) { return EnumBlockRenderType.MODEL; } @Override public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) { if(!worldIn.isRemote) { TileEntity tileentity = worldIn.getTileEntity(pos); if (tileentity instanceof TileEntitySolarPlant) { playerIn.addChatMessage(new TextComponentString("Energy:"+((TileEntitySolarPlant) tileentity).getCurrentEnergy() + "/" + ((TileEntitySolarPlant) tileentity).getEnergyStorageLimit())); } } return true; } @Override public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { worldIn.addTileEntity(new TileEntitySolarPlant()); return super.onBlockPlaced(worldIn, pos, facing, hitX, hitY, hitZ, meta, placer); } @Override public boolean isFullBlock(IBlockState state) { return false; } @Override public BlockRenderLayer getBlockLayer() { return BlockRenderLayer.CUTOUT; } @Override public boolean isOpaqueCube(IBlockState state) { return false; } } and here the TileEntitySolarPlant.class package net.kaneka.planttech.blocks.tileentities.energy.producer; import net.kaneka.planttech.energysystem.interfaces.IEnergyConsumer; import net.kaneka.planttech.energysystem.interfaces.IEnergyController; import net.kaneka.planttech.energysystem.interfaces.IEnergyProducer; import net.minecraft.block.Block; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ITickable; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class TileEntitySolarPlant extends TileEntity implements ITickable, IEnergyProducer{ private int maxEnergy = 16000; private int energyatm = 0; private int energyPerTick = 1; private int tickstillremove = 25; private BlockPos controllercoordinates; @Override public void setNetwork(World world, BlockPos controller, int cableAmount, int cableTier) { boolean alreadyregisted = false; tickstillremove = 25; if(controllercoordinates != controller) { alreadyregisted = true; } if(alreadyregisted) { this.controllercoordinates = controller; Block controllerblock = world.getBlockState(controller).getBlock(); if(controllerblock.hasTileEntity(controllerblock.getDefaultState())) { TileEntity te = world.getTileEntity(controller); if(te instanceof IEnergyController) { ((IEnergyController) te).registerEnergyConsumer(this.pos, cableAmount, cableTier); } } } } @Override public int getEnergyStorageLimit() { return maxEnergy; } @Override public int getCurrentEnergy() { return energyatm; } @Override public void reduceCE(int amount) { if(energyatm >= amount) { energyatm = energyatm - amount; } } @Override public void update() { if(this.getWorld().getLightFromNeighbors(pos.up()) > 14) { if(maxEnergy >= (energyatm + energyPerTick)) { energyatm = energyatm + energyPerTick; } if(maxEnergy < (energyatm + energyPerTick)) { energyatm = maxEnergy; } } } @Override public void readFromNBT(NBTTagCompound compound) { super.readFromNBT(compound); energyatm = compound.getInteger("energyatm"); tickstillremove = compound.getShort("TicksTillRemove"); int x = compound.getShort("ControllerX"); int y = compound.getShort("ControllerY"); int z = compound.getShort("ControllerZ"); controllercoordinates = new BlockPos(x, y, z); } @Override public void writeToNBT(NBTTagCompound compound) { super.writeToNBT(compound); compound.setInteger("energyatm", energyatm); compound.setShort("TicksTillRemove", (short)tickstillremove); compound.setShort("ControllerX", (short)controllercoordinates.getX()); compound.setShort("ControllerY", (short)controllercoordinates.getY()); compound.setShort("ControllerZ", (short)controllercoordinates.getZ()); } } I hope someone can help me. Thanks for every answer! Kaneka- [1.9] Custom loot table for my own structures?
Thanks, and how do I set my own ChestGenHook? Not just adding Blocks and Items, I want a complete own. - [1.10.2] blockstate question
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.