-
Posts
5160 -
Joined
-
Last visited
-
Days Won
76
Everything posted by Choonster
-
Extra Utilities requires a newer version of ForgeMultipart than the one you have installed.
-
Update AromaBackup.
-
You're iterating through the key set, which is a Set<String> . If you want keys and values, iterate through the entry set instead; this is a Set<Entry<String, Float>> . There's no need to use an Iterator and remove values here, just iterate through the entry set with a for-each/enhanced for loop and leave the message's map intact. It will simply be garbage collected with the message object itself when it's no longer referenced by anything.
-
[1.8] Using server json instead of the clients?
Choonster replied to HappyKiller1O1's topic in Modder Support
Subscribe to FMLNetworkEvent.ServerConnectionFromClientEvent to be notified on the server when a client connects. All subclasses of FMLNetworkEvent are fired on a Netty thread, so you need to schedule a task on the main thread using the appropriate IThreadListener like you do for message handlers*. This will give you an INetHandlerPlayServer from the FMLNetworkEvent#handler field which you can cast to NetHandlerPlayServer to get the player from the NetHandlerPlayServer#playerEntity field. You can then send whatever data you need to this player. You'll probably want to subscribe to FMLServerStartingEvent (this is a state event handled by an @Mod.EventHandler method in your @Mod class) and repopulate the data from the JSON if it's an integrated server. This is because the client and integrated server are two threads running in the same JVM, they share an instance of your @Mod class and anything created in it. For this same reason, it's probably not necessary to handle FMLNetworkEvent.ServerConnectionFromClientEvent in the integrated server. * I'm not entirely sure whether or not it's safe to use a SimpleNetworkWrapper from a Netty thread. -
[1.8] Using server json instead of the clients?
Choonster replied to HappyKiller1O1's topic in Modder Support
You'll need to send a packet to the client containing the server's settings. Forge's Read the Docs site has a section on networking here, you'll want to use the Simple Network Implementation. -
Look at GuiCrafting to see how the vanilla Crafting Table creates its client-side Container and renders the GUI. You can use the same code, but create an instance of your Container class instead of ContainerWorkbench . BedrockMiner has a tutorial on the GUI Handler system here.
-
[1.8] ItemStack#stackSize returning 0?
Choonster replied to HappyKiller1O1's topic in Modder Support
ItemPickupEvent is fired after the ItemStack is added to the player's inventory with InventoryPlayer#addItemStackToInventory , which sets the ItemStack 's stack size to 0. You'll probably want to subscribe to EntityItemPickupEvent instead, since it's fired before the ItemStack is modified. -
BlockWorkbench.InterfaceCraftingTable opens ContainerWorkbench , which overrides Container#canInteractWith to return false if the block at the specified position isn't a Crafting Table. This is called every tick in EntityPlayer#onUpdate , if it returns false the Container and GUIScreen are closed. You'll need to create your own Container that extends ContainerWorkbench and overrides Container#canInteractWith to return true if the player can interact with it (if there's no restrictions, just return true every time) and your own GuiScreen that extends GuiContainer , creates an instance of your Container class and renders like GuiCrafting . Use FML's IGuiHandler system to open your GUI.
-
Item Work In Place Of Another? (in crafting)
Choonster replied to jackmano's topic in Modder Support
This is what the Ore Dictionary is for, but Blaze Rods aren't registered with it by default. This means vanilla recipes and most mod recipes will just use Items.blaze_rod as an ingredient directly instead of using an ore name. You should add vanilla Blaze Rods and your synthetic Blaze Rods to the Ore Dictionary with the same ore name (e.g. rodBlaze , which is already used by various other mods and modpacks) and then use ore recipes ( ShapedOreRecipe / ShapelessOreRecipe ) in your mod. Use this ore name as an ingredient instead of using an Item instance. I have a 1.7.10 class here that can replace any existing recipes that use the specified ItemStack as an input or output with ore recipes that use the specified ore name as an input and a specified replacement ItemStack as the output. -
That's an anonymous class that extends ModelBiped and overrides render . It's what TLHPoE was referring to in this post: If you mean the ModelBiped function, I overrode it so I could put the print in to check if it was rendering. I also called the super so that it would render the model if it did, which it didn't.
-
Every version of Thaumcraft is closed-source.
-
Like diesieben07 said, read the EAQ. Search for "loading screen" on that page and it will tell you how to disable it.
-
[1.7.10]Forge server working, but nobody can join
Choonster replied to MaxKess's topic in Support & Bug Reports
That server log doesn't show any attempted connections, so the Minecraft server isn't even receiving connections from clients. Post the client log as well. -
I'm trying to test the substitution alias system by replacing the minecraft:snow_layer block with a block that has an extra property and sends a chat message to the player when right clicked. You can see my code here. Unfortunately this doesn't seem to work. The F3 debug info doesn't display the value of the extra property and none of my replacement class's methods are being called (except Block#createBlockState , but that's called from the constructor). I added a blockstates JSON that uses the vanilla snow layer models and adds a pillar submodel in the centre, but the submodel isn't displayed in the world or in the inventory. If I uncomment the item alias, it creates a new item instead of replacing the vanilla item. The new item crashes with an ArrayIndexOutOfBoundsException when right clicked because it doesn't have an item ID. Has anyone managed to get this system working?
-
[1.8][SOLVED] Running through the block/item registry?
Choonster replied to HappyKiller1O1's topic in Modder Support
Yes, a Block and its ItemBlock have the same registry name. Since you're only dealing with items in inventories, you can just ignore the block registry completely and only deal with the item registry. -
[1.8][SOLVED] Running through the block/item registry?
Choonster replied to HappyKiller1O1's topic in Modder Support
FMLControlledNamespacedRegistry<Block> blockRegistry = GameData.getBlockRegistry(); for (Block block : blockRegistry.typeSafeIterable()){ String name = blockRegistry.getNameForObject(block).toString(); } -
[1.8][SOLVED] Running through the block/item registry?
Choonster replied to HappyKiller1O1's topic in Modder Support
Use GameData.getBlockRegistry and GameData.getItemRegistry to get the block and item registries. Use FMLControlledNamespacedRegistry#typeSafeIterable to get an Iterable that can be used in a for-each loop (a.k.a enhanced for loop). Use RegistryNamespaced#getNameForObject (inherited by FMLControlledNamespacedRegistry ) to get the registry name of an object. This may be a ResourceLocation or a String . -
[1.7.10]TileEntitySpecialRenderer Transparent Sides.
Choonster replied to JRE8's topic in Modder Support
Minecraft assumes every block is an opaque cube by default, so it doesn't render faces that are covered. Override Block#isOpaqueCube to return false so Minecraft always renders the faces adjacent to your block. -
[1.8.8/1.8.9] Help with Forge blockstate transforms
Choonster replied to Choonster's topic in Modder Support
Bump. Does anyone know how to do this? -
update mod from [1.8] to [1.8.8] few errors ??
Choonster replied to perromercenary00's topic in Modder Support
The Render class is now generic: it has a type argument T extends Entity (i.e. the type of entity that it renders). Render#getEntityTexture now takes an argument of type T . You could figure this out for yourself if you looked at the source code using your IDE. -
[1.8.9] Applying a potion effect via a TE
Choonster replied to Disconsented's topic in Modder Support
I just wrote my own implementation of this (which you can see here) and it works without issue. -
Minecraft 1.7.10 Forge instantly closes
Choonster replied to Dec_bot's topic in Support & Bug Reports
You're trying to use a coremod built for 1.8+ on a 1.7.10 client, this won't work. -
Your paste is private, we can't read it. Use an image hosting site like Imgur to host screenshots and post links here. I don't think screenshots are necessary for this problem, though.