Jump to content

BusyBeever

Members
  • Posts

    201
  • Joined

  • Last visited

Everything posted by BusyBeever

  1. http://www.minecraftforge.net/forum/index.php/topic,22764.0.html
  2. make ur TileEntity implement IFluidTank. For more help google how to use IFluidTank, there is plenty of information
  3. oh boy. ooooh boy. First of all read how to use the events (you are not using living death event) Second. its event.entity instanceof EntityZombie Third.. I guess I will leave a hint to seriously study java
  4. http://en.lmgtfy.com/?q=java+how+to+override+methods
  5. The crafting inventory can be smaller then 3. e.g. 2x2 so dont iterate until 3, check the size of the crafting and use that as bounds why are u adding all stacks to the list? why not all that are !=null? after that u can check if the size of the list is 2. if it is not ur recipe wont match
  6. in 1.8 there is ISmartItemModel that you can use, in 1.7.1 it was... IItemModel? Im not sure but there was a way to create dynamic textures on the fly
  7. The problem right now is that the player can put in like 4 rad armors, one normal armor 4 sticks and your recipe would still say "hey that matches"
  8. Yes. The event is called LivingHurt, there u can check if the dmg comes form an arrow
  9. The thing is if you think about it you ALWAYS know at which side you are at the moment. If you are sending a packet always make sure that you define where your packet is going (client->server / server->client) that way you always know how to access the information when handling the packet. e.g. a packet to sync tileentity data is supposed to go from server to client, so you know you can always access Minecraft.getMinecraft if needed etc
  10. You dont really need multiple inheritance if you are designing your code correct.
  11. Well. I dont see any example of using a capability, and the tutorial from readthedocs is seriously hard to read. Im just having problems because im just like "oh yeah that piece of code looks awesome but I dont really see where I use it". But thats obviously also my problem because I kinda hate text tutorials.
  12. setting the second argument to 100 does not mean 100%
  13. If I see this right I need to manually save it right? public abstract class TileEntityInventoryProvider extends TileEntity{ private ItemStackHandler handler; private static final String INVENTORY_KEY = "beeverutils.inventory"; protected abstract int getSize(); public TileEntityInventoryProvider() { handler = new ItemStackHandler(getSize()); } @Override public boolean hasCapability(Capability<?> capability, EnumFacing facing) { if(capability==CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) return true; return false; } @Override public <T> T getCapability(Capability<T> capability, EnumFacing facing) { // TODO Auto-generated method stub return (T)handler; } @Override public void writeToNBT(NBTTagCompound compound) { super.writeToNBT(compound); compound.setTag(INVENTORY_KEY, handler.serializeNBT()); } @Override public void readFromNBT(NBTTagCompound compound) { super.readFromNBT(compound); handler.deserializeNBT((NBTTagCompound) compound.getTag(INVENTORY_KEY)); } }
  14. Hey everyone, I am triing to start getting used to the new Capabilities system. I am triing to create my own TileEntity with an Capabilitie, instead of IInventory. And even after reading the page about it I am TOTALLY confused. Do I need to create my TileEntity and make it an ICapabilityProvider?
  15. the ModelSCObj is underlined saying Cannot instantiate the type ModelSCObj thats because ModelSCObj is an abstract class. https://docs.oracle.com/javase/tutorial/java/IandI/abstract.html
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.