Everything posted by Draco18s
-
[1.9.4] [SOLVED] Problems with Entities
You kinda need to register an entity renderer too.
-
Help creating a tool?
For example: https://github.com/Draco18s/HarderStuff/blob/master/src/main/java/com/draco18s/ores/recipes/NEIIntegration.java
-
[1.8.9] Making a timer?
Compare written world time to the currnet world time + delay amount. If greater: Do your effect and write the current world time to the ItemStack's NBT. Else: Do nothing
-
[1.8.9] onItemRightClick keydown?
That will crash a dedicated server. The server may not have a keyboard attached or know what a keyboard is. Not to mention having no fucking clue about the remote connection's keyboard status. You will have to implement this as a Capability / IExtendedEntityProperty that's set on the client via the Keybind class (don't ever directly reference the Keyboard: there are Keybinds for a reason, use them) and then use packets to sync. Then hold on a moment, you're looking at the shift key. Shift makes the player sneak. player.isSneaking done. Jesus.
-
Help creating a tool?
There is not. You would need to handle every mod individually.
-
[1.8.9] Switching Items?
The right-click method has an ItemStack parameter and returns an ItemStack. Just return a different item stack.
-
[1.9.4] Item doesn't display its texture
All of this is bad: public ItemBase init(FMLInitializationEvent event) { GameRegistry.register(this); if(event.getSide() != Side.SERVER) { registerModel(); } return this; } private void registerModel() { ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(TheMod.MODID + ":" + name, "inventory")); }
-
Help creating a tool?
Mind there's also Smelting recipes (Furnace.getSmelting() iirc) and brewing recipes. Mods then may add their own recipes devices (grinders, sifters, macerators, crushers, extractors, compressers, canners, electrolyzers, injectors, washers, mixers...).
-
Using the CofhLib
Even with no attached source you'll still get code hinting.
-
Using the CofhLib
"Using" and "Reading" are two separate things: Eclipse can still use the jar to validate code that you right, it just can't show you the source.
-
[1.9] Custom Quest Book
The book is just an item that displays a GUI. In that GUI you can make it draw whatever you want.
-
[1.9.4] Custom redstone help (I've already created it but I have problems)
Item.getItemFromBlock... gets...the item form of the block...
-
[1.9.4] Custom redstone help (I've already created it but I have problems)
You gave it a model for the item but not the block. Also:
-
[1.9] [SOLVED] Registering Items
Along with that, don't use item.getUnlocalizedName().substring(5) , use getRegistryName . Then go punch whoever told you to use getUnlocalizedName.
-
[1.8.9]How to render custom pressure plate
Yes. Because you have a common class ( BlocClearInventory ) that contains sided code ( registerRenders references Minecraft.getMinecraft() ). As soon as the server reads your block class from the disk, it needs to make sure that the class is valid code. This includes loading every class referenced by your class. This means that it will then attempt to load the Minecraft class, which won't exist. This is not a question of "where is it called from." This is a question of "does the code exist." Your class contains CLIENT SIDE ONLY code. The mere existence of that code crashes the dedicated server, even if you never call the function from anywhere ever. This is why the registerRenders code must be moved out of the block class and into the ClientProxy.
-
[1.9.4] Custom redstone help (I've already created it but I have problems)
Have you registered your block model with the rendering registry?
-
Help creating a tool?
That's because you're looking at the raw bytecode for the mod, not the source code. If you wanted to read .class files as code, you'd need to decompile it first (fortunately Java is an open source format, albeit complicated). Or you can write it as a mod, as diesieben suggests.
-
[1.9.4] Using GUIs
I'm not quite I see the error. I apologize, I didn't realize your main class was named "Chest." What I saw was the openGui command that vanilla uses to open chests, not the mod-specific openGui. You should refactor -> rename your main class so it's some like "MoreChests" or better still "MoreChestsBase" or "MoreChestsMain" so it's clear that it's your base or main mod class file.
-
[1.9.4] addSmelting() with more than 1 xp
If you smelted to a custom item then you'd be able to tell. But yeah, smelting isn't supposed to give you a lot of exp.
-
Compile error: Cannot find symbol
You need to add BOP to your gradle.build file under Dependencies
-
[1.9.4] Using GUIs
You aren't using the correct onBlockActivated method. Look at the Gui Handler tutorial again.
-
[1.9.4] addSmelting() with more than 1 xp
Apparently not, just looked at the call stack for it. The only thing passed to the event is the player and the result stack.
-
[1.9] Cannot get texture/model to work
item != items
-
[1.9.4] addSmelting() with more than 1 xp
You can't. The number is not "how much experience to drop per smelt" it is "what is the probability of dropping 1 experience per smelt." You would need to use events to drop more.
-
[1.9.4] addSmelting() with more than 1 xp
You can't. The number is not "how much experience to drop per smelt" it is "what is the probability of dropping 1 experience per smelt." You would need to use events to drop more.
IPS spam blocked by CleanTalk.