Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Everything posted by Animefan8888

  1. Anything you changed on the server must also be changed on the client. Config files, added/removed mods, etc.
  2. No there is no short way to achieve this, You'll either have to use an if statement or a switch statement.
  3. I assume you are a developer of a mod. You posted this on the wrong subforum. Can you elaborate more on what you are trying to do?
  4. This won't even compile so I definitely didn't mean anything like that.Just don't override getNBTShareTag or getShareTag. That way all of the NBT will be sent to the client. Then you can override readNBTShareTag and use it to update your ItemStack's capability.
  5. The solution to your problem is to not modify the NBTTagCompound in getShareTag. Just send all of the data. There was a PR here, but it seems to have been forgotten about. Maybe making a comment on the PR and tagging Mezz in it will bring it back to their attention. Though the problem isn't that big of one, because in most cases creative mode won't be used.
  6. Screens are separate for each player and so are containers I think. No because you would be getting it from the client player. Sync the specific data to the client whenever it changes if it can change while in the container, or if it can't change when in the container sync it when the container opens. With your own packet.
  7. This will crash the dedicated server, since the function you are calling is marked @SideOnly(Side.CLIENT) What you have to do is copy what it does inside the method. Yes the fact that it runs twice would be a basic forge concept, but that crash is something you could have solved yourself then came to the conclusion that it runs twice... Also it would be basic Java concept to check if something is an instanceof "ClassName" before you cast to it. You don't just willy-nilly cast one thing to another. A RayTraceContext contains all the information to perform a ray trace. It knows if you want it to consider fluids, along what vector do I ray trace for(vec3d->vec3d2).
  8. That's what you use a Capability for...NBT is only used to save data to the disk. It shouldn't be used to store and access values. Don't do this. Attach a capability to the player to store the data you want on the player. Then use EntityPlayer#getCapability to get your capability instance and modify and access the data from there.
  9. I can't say that Is a minecraft forge related problem. You can change those class names to anything else and it would still be the same problem. Also
  10. The tutorial must have been severely outdated. It should look something like this. Then use the IItemHandler instance(items) to insert and extract items from specific slots. private IItemHandler items = new ItemStackHandler(numberOfSlots); public boolean hasCapability(Capability<?> cap, EnumFacing facing) { return cap == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY ? true : super.hasCapability(cap, facing); } public <T> T getCapability(Capability<T> cap, EnumFacing facing) { if (cap == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) return CapabilityItemHandler.ITEM_HANDLER_CAPABILITY.cast(items); return super.getCapability(cap, facing); }
  11. Don't use this create an IItemHandler instance in your TileEntity and return it in the getCapability(Capability, EnumFacing) method,
  12. I don't understand what you mean by not working. What did you expect to happen vs what is happening? What portion of code is it we are talking about.
  13. A unique registry name. What you have is fine. I believe it is used for saving to disk, but I could be wrong.
  14. Of course its not correct you never reference your capability on the player.
  15. That's a Java error if you don't know how to solve that look it up elsewhere we are not here to teach basic Java concepts.
  16. No it is not. Just send them as raw types. int, double, float ect. No use the @ObjectHolder annotation to give them values.
  17. ServerWorld only exists on the server and it represents a world on the server. Cast world to ServerWorld. Look up what Ray Tracing does.
  18. registerItems(event) event,getRegistry().registerAll( new Item(...), new Item(...), .... ); You've got two ways to initialize the fields however you can use ObjectHolder annotation. Or you can just do SOME_ITEM = new Item instead of just new Item.
  19. Use the EntityJoinWorldEvent to change the Goals in MobEntity#goalSelector.
  20. It can if you get the JSON Editor plugin for eclipse from the Market Place. Help -> Eclipse Marketplace. Then search Json.
  21. Uninstall it like you would any other program. Control Panel -> uninstall a program Only download forge from here. Also only download mods from reputable sources, places like curse forge or either the Minecraft Forums by the mod developer or here by the mod developer.
  22. How much RAM did you dedicate to Minecraft.
×
×
  • Create New...

Important Information

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