Everything posted by Draco18s
-
[1.12.2] Block named "Ruby Block" is getting named as tile.ruby_block.name while in-game for what reason?
Yeah. That's LoreMaster. I've made comments on his videos about the sort of crap he ends up recommending, whether intentionally or not.
-
[1.12.2] Custom Furnace Doin Weird Stuff
This is not going to work, for two reasons: 1) You're cloning an array, not the item stacks 2) You check for null *after* calling .clone() on it.
-
Being able to place a block on all directions
This is the purview of IBlockStates and the blockstate json file.
-
Item Capability not saving one field during world reload
If you set a value to it, then save, then clear the value (so it is null), and then save.... ....what happens?
-
[1.13.2] How to make a new transparent block
There may also be isOpaque or isFullCube that you might have to fiddle with too. I haven't poked around in 1.13 yet, but isSolid (and isSideSolid) was used for mechanical transparency (i.e. could you place a torch on it) whereas isOpaque dealt with the rendering aspect.
-
[1.13.2] Recipe item factories
ReflectionHelper I believe was renamed to ReflectionObfuscationHelper (ObfuscationReflectionHelper?)
-
[Solved][1.13.2] Custom Ore Drops
Also works, yes. The point here was to get you to think, "Where does vanilla do this?" and go find it.
-
Removing Vanilla Stuff???
"Get the crafting result, is that object equal to the string 'minecraft'?" Almost certainly not.
-
Why forge instantiates client-side packet handlers in dedicated server environment?
*Referenced @SideOnly literally deletes the code on the other side. If you have a reference to it that isn't also covered by @SideOnly (even if its never called!) the JVM will say, "Whoah boy! You've got a method call in this class that isn't valid!" and terminate.
-
[Solved][1.13.2] Custom Ore Drops
Have you tried looking at the BlockDiamondOre class?
-
Why forge instantiates client-side packet handlers in dedicated server environment?
Oh, and for reference, Forge doesn't even have to instantiate the class in order to get a ClassNotFoundException the way you have. Simply by telling the JVM that your client sided packet handler exists is sufficient. Because the JVM goes "I have to load this class, I don't know when--or indeed if at all--any given part of it will be executed, so I'm going to check that all of it is valid. To do that I need to make sure any additional classes it references are ones I can find, just in case I need to load them in the future. Oh what's this? I see a reference to EntityPlayerSP, I don't know what that is or where it find it. Crap."
-
[1.12.2] Item Property Overrides Changes All Item Textures
https://stackoverflow.com/q/17524673/1663383
-
[1.12.2] Item Property Overrides Changes All Item Textures
I can replace this: With this: nbtTagCompound.setInteger("lIndex", (nbtTagCompound.getInteger("lIndex") + 1) % 4);
-
[1.12.2] Item Property Overrides Changes All Item Textures
So, it will do this: 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0... Yes? If so, why do you need an integer? Or an if statement at all? 1 - currentValue will do this just fine. So will (currentValue + 1) % maximum
-
Removing Vanilla Stuff???
See comments. Now go learn Java.
-
Just refactored my code for non-static registries, need help with a crash
Unrelated things: https://gitlab.com/LaDestitute/Spelunkcraft/blob/unstable/src/main/java/ladestitute/spelunkcraft/util/ModUtil.java#L64-73 ...You do know that setRegistryName and setTranslationKey both return the object, right? You can totally do this: Block b = new BlockWhatever().setRegistryName(...).setTranslationKey(...) Ditto items. Or you could do it right in the constructor where you're already calling setRegistryNames...The only real value this has is setting the translation key to the registry name, but because of where you're calling this, there is no reason why you need these generic overloaded helper functions, except here where, where it's still unneeded because of the above. You also return the entry object despite doing nothing with it, so what was the point? Ditto setCreateiveTab. https://gitlab.com/LaDestitute/Spelunkcraft/blob/unstable/src/main/java/ladestitute/spelunkcraft/util/ModUtil.java#L135-141 Why. Seriously, why did this need a method call? https://gitlab.com/LaDestitute/Spelunkcraft/blob/unstable/src/main/java/ladestitute/spelunkcraft/items/treasure/SmallRuby.java#L12 Classes like this....don't need classes. Seriously, you gained fuck and all with this class. And what's this? Didn't like your mod util class this time? Just use new Item() https://gitlab.com/LaDestitute/Spelunkcraft/blob/unstable/src/main/java/ladestitute/spelunkcraft/proxy/CommonProxy.java CommonProxy is stupid. Anything that would go here should go in your main mod class. Not that you even call these methods anyway. Speaking of the proxy, and sided things, you have a client folder. And a server folder. Why are your proxies not in these folders but instead in a special "proxy" folder? Organize by groups, that's what its for. Everything that's client side goes in the client folder the client proxy is client sided! It goes in the client folder.
-
[1.12.2] Item Property Overrides Changes All Item Textures
1) remove this 2) use the logger the FMLPreInitializationEvent gives you Did you mean to leave this empty?
-
OnBlockActivated is not working
With the correct Block#onBlockActivated method signature.*
-
[1.12.2] Ignoring Durability on NBT-Tagged Items in Recipes
Tough.
-
Removing Vanilla Stuff???
Why do you have a method inside a method?
-
What versions are supported
I mean, you CAN, but you're not going to get any help working with it here.
-
[1.13.2] Some forge questions from a novice
Not necessarily, but yes, that would work. (There are only 4 or 5 actually levels in vanilla, but that's quibbling) What do you mean? You can reuse classes, you're just creating new instances with different data. For example, both the vanilla stick and iron ingots ate both instances of the Item class. They don't have a ItemStick or ItemIronIngot classes.
-
Removing Vanilla Stuff???
Items.BREAD.setCreativeTab(null) Is the same as ForgeRegistries.ITEMS.get(new ResourceLocation("minecraft","bread")) Yes. Well, probably. You need the right event type. Sort of. The method signature needs to match in order for it to be called. If you don't have an Event type as the only parameter, then no event call will ever invoke your method because the signature would never match.
-
Removing Vanilla Stuff???
Neither, because neither method takes a parameter of type Event. Neither, because neither is a startup even method (preInit, Init, postInit) Neither, because neither method correctly uses the Items registry (which item are you changing?) The second one also declares a return type that is both unneeded and never returned. Items.BREAD, Items.REDSTONE_DUST, Items.CAKE etc
-
Removing Vanilla Stuff???
Double colons (e.g. SomeClass::SomeMethod) has a similar meaning, but I'll be honest that I haven't seen the distinction clarified for me. Just pointing out that you might see that sometimes too.
IPS spam blocked by CleanTalk.