Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

DoctorLOGiQ's Achievements

Tree Puncher

Tree Puncher (2/8)



  1. Alright, I was able to attach a TileEntityRenderer to my block, however if I override render() and leave the function empty, it seems to still be rendering the block as default. I checked with logging and it is being called. Why could this be? I'm not calling the super.
  2. Hey modders! I'm looking to find out if it's possible for me to toggle individual parts of a .obj block model via the java code. The block in question will be a TileEntity because it needs to function, so I'm assuming a TESR may be in order? I've been away from the modding scene for a while, and as a result have forgotten how these are set up. Besides, the code has changed significantly since last time and I don't want to assume it's the same, and the documentation is untrustworthy and out-of-date. Not only that, but I don't know if a TESR is the way to go. TLDR: The .obj model comprises of multiple objects, some of which I want to control the visibility of (just a simple toggle on/off) from Java. What would be the best approach to doing this? As an added bonus, is there a way I can control cullable faces? When using "detectCullableFaces": true and placing multiple of my block next to one another, touching faces are culled in a way that doesn't look right, and it's not a backface problem in the model because I always check those. The model isn't super high poly-count so I could get away with disabling cullable faces which leaves the model looking correct, but I would like the block to be optimised if I can. Thanks in advance for any help.
  3. This should fix that problem, the method is marked as deprecated yet the game uses it. *sigh* Mojang... @Override public boolean isSolid(BlockState p_200124_1_) { return false; }
  4. Your logger should be a reference to LogManager.getLogger(); (org.apache.logging.log4j.LogManager)
  5. Try making the event subscriber function static. Also make sure you have registered your event handling class with FML's EVENT_BUS, which you can do with MinecraftForge.EVENT_BUS.register(new YourEventClass()); in your mod's pre-initialization or initialization phase.
  6. Hello, what is the value of ForgeOfIndustries.logger ? And which version of Forge are you working with?
  7. Thank you, I will take a look. It does seem like an incredible amount of classes/work just to send packets to/from a server, but I will *try* to make sense of what's going on there. Thanks for your help!
  8. Yes, that error happens all the time, it is not very likely to be anything on your end, so don't worry about it. I get it too, even with a fresh mod setup. Presumably the world loading just causes a bit of a hang and client requests get buffered up and then come through all at once when the hang ends.
  9. Yes, I guess you've already implemented that then. Looking at some of my old working code, onBlockActivated () did not cause any problems, and we've done things the same way by the looks of it. Are you using GuiContainer for your Gui class? If so then I don't see a reason why it wouldn't work, unless it's not finding the TileEntity - might be worth doing some logging just to make sure it's not null anywhere it shouldn't be.
  10. Try looking into IGuiHandler, I believe you need to register one of those which will return a container on the server side (!world.isRemote) and a GUI on the client side (world.isRemote). Also the "certain amount of requests" error seems to always get posted for me when I load a world up, I've learnt to ignore them.
  11. Ok, I have seemingly got the capability working. Now the problem is, I don't think it's properly synced between the client and server sides, or otherwise something *very strange* is going on. In my Item's addInformation() method, I have a single line; tooltip.add(new TextComponentString(ChatFormatting.DARK_GRAY + "State: " + instance.getStateStringFormatted() + " (" + instance.getState().toString() + ")")); which is meant to print the "state" of the item (just one of my enums). Inside the implementation, getStateStringFormatted() returns: switch (this.state) { default: case Off: return ChatFormatting.RED + "Off"; case Booting: return ChatFormatting.AQUA + "Booting"; case Booted: return ChatFormatting.GREEN + "Booted"; } and getState() returns this.state . So therefore, you would expect, that both these calls should print the same value, but guess what! They don't. Does some kind of synchronisation need to happen?
  12. How would this work with, say, an Item's addInformation() method? I would like to be able to display information retrieved from calling a getter method within the interface, would that be possible, or should I try a different approach? This information should be specific to an ItemStack, and the stacks are limited to a max size of 1. Edit: My sincere apologies, this is me being dumb now. Of course a lambda expression would still be inside the function. For some reason I was thinking of it as a separate thing, heck knows why ? I will adapt and test my code and provided it doesn't continue crashing the issue should be resolved. However, there was a new error occurring a while ago to do with saving NBT data, but I think I know a possible cause of that.
  13. Alright, I didn't realise the code had been changed. Which method in LazyOptional is the best to use to return the interface instance? Yes, the TestMod is an excellent resource and I thank you for that @Choonster.
  14. As per https://github.com/Choonster-Minecraft-Mods/TestMod3/blob/d045f88657816da463adfc631ee2ff1c96599798/src/main/java/choonster/testmod3/capability/pigspawner/CapabilityPigSpawner.java#L111, I have created a LazyOptional function, to return (supposedly) the capability from the ItemStack. The problem is, I can't actually USE the ruddy thing. *Apparently* you can cast to the capability interface as seen here: https://github.com/Choonster-Minecraft-Mods/TestMod3/blob/d045f88657816da463adfc631ee2ff1c96599798/src/main/java/choonster/testmod3/item/ItemPigSpawner.java#L42) (also side-note, typo in the documentation for this function - "...if amy"). But can I actually cast to the capability interface in reality? Not so much... net.minecraftforge.common.util.LazyOptional cannot be cast to ((capability interface)) is being thrown from Item#addInformation() where I have tried to access the capability, as is done in the TestMod, to no avail. How do I cast this to something usable? I have done capabilities in 1.12.(I wanna say... 2), but this system is so weird and changes so often it's hard to keep up. I'm not posting any code because it's unnecessary, I can guarantee I've spent the past 3-4 hours ensuring I've done everything I need to (and no more) pretty much as it was done before, but using the new changes, and referencing the TestMod for ALL OF IT. In other words, the code is *exactly the same* (except for the names, and the actual capability itself, of course. I ain't spawnin' no piglets!). And yes... the capability is being registered.
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.