Everything posted by Draco18s
-
[Any Version] Nested classes: where and when
Oh I agree. Just that some new folks don't know that and seem to think that because the code is in the same file it's fair game to dip things that won't work. Like making the message and message handler the same class...
-
Hopper question for 1.11.2
Eg https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/api/internal/inventory/OutputItemStackHandler.java That class is set up to only allow extraction, not insertion, but the methodology is the same. I recommend this because it us a wrapper around another handler that CAN have things inserted into it (eg by the machine's own logic) but which isn't exposed directly.
-
[Any Version] Nested classes: where and when
While true, I recommend against it due to the potential to confuse the scope ("my packet handler runs, but it doesn't recieve the data, but I know I'm sending it!") as the modder tried to reference the packet data not from the object passed, but through container scope, even through the objects were different instances. Keeping them in separate files helps the fledgling modder. I use nested classes for things like data wrappers, where I need to bundle two items together for a sorting function, or similar, but that that wrapper is never used outside that scope.
- Help
-
TileEntity Issue with rendering|| 1.11.2
No, that would also be wrong. ITileEntityProvider is also out of date (look, it even still uses metadata) Override the createTileEntity() and hasTileEntity() from the Block class
-
TileEntity Issue with rendering|| 1.11.2
You still shouldn't use BlockContainer. It's old and out of date and does a bunch of garbage (like overriding the render type) that you don't want.
-
[1.10.2] TESR won't render item inside on world load
- Help
oh no. ten dollars. whatever shall you do. Seriously. https://www.amazon.com/UGREEN-Ethernet-Adapter-Nintendo-Chromebook/dp/B00MYT481C/ref=sr_1_4 also, start using MB notation rather than GB in your decompile command. 1G will be too little and 2G your computer can't supply. You need to drop down and get finer grained. I did it once, you can too.- [SOLVED][1.10.2] onBlockActivated called twice
- [SOLVED][1.10.2] onBlockActivated called twice
It's called exactly once. Once for each hand- TE properties seemingly being set randomly
1) you implement those methods 2) you call these when the data changes- Data from one block to another
Multiple instances or multiple types? Am interface is just an object which says "this method exists" and then every class that inherits that interface MUST provide an implementation.- [1.10.2] Delayed packets/events
EntityJoinedWorldEvent probably- [1.12] Tileentity not working right
Block#getDrops() getItemDropped() specifically returns only an item which would have to be combined with getDamageDropped() or whatever it's been renamed to.- [1.10.2] Item Model Variants
Same way you register any other item model.- [1.11.2] Allow certain slots of ItemHandler only be accessible from certain sides
Likely whatever feature your about to ask for is already possible. You can combine ItemHandlers already, so you'd just spilt them up and combine them as needed. https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/farming/entities/TileEntityTanner.java#L143- [1.12] Tileentity not working right
Also your code is a mess. There's a half dozen or more variable with names like xxx1, xxx2, xx3, etc. Not to mention constructing facing enums from their index, which is SUPER meaningless.- Data from one block to another
world.getTileEntity(pos)?- HELP! GETS BLOCKS IN AREA!
You can't do server things from the client.- Data from one block to another
If you're transferring power then yes, you'd need a TE to store the power in.- java.lang.NullPointerException
https://github.com/Jigokusaru/MegaMoney/blob/master/main/java/com/jigokusaru/jmmm/JMMM.java#L35-L36 You initialize your items before your blocks, so ModBlocks.vendingmachine is null.- HELP! GETS BLOCKS IN AREA!
BlockPos.getAllInBox(from, to)- [1.12] Tileentity not working right
I don't see anything wrong, so you're probably going to have to debug this yourself.- [1.12] Tileentity not working right
So what's the problem?- [1.12] Tileentity not working right
1) Do not use ITileEntityProvider, override the methods found in the Block class. ITileEntityProvider is old and is based on metadata, not IBlockstate 2) You need to mark dirty in the case if (FUEL_AMOUNT <= 0) { } as well. - Help
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.