-
Posts
444 -
Joined
-
Last visited
-
Days Won
5
Everything posted by kiou.23
-
Please, for the love of god, don't just paste your code as plain text, it's painfull to try and read it. The forums has a tool that you can use to post code, it will even do syntax highliting, you just click on the angle brackets that show up on the top of the textarea you use to make the post (near the smiley) Same goes for error logs, post them in something like gist or pastebin, or use the code thing, makes it waaay easier to read Don't register your blocks through Registry Events, the preferred way is to use DeferredRegisters, you can find more info on it in the docs It seems that you are trying to set some block state in getStateForPlacement, however your blocks has no block states, you need to set the defaultState in the constructor, and then override fillStateContainer, to "register" your states If fixing the blockstate, and using DeferredRegisters doesn't solve your issue, post your build.gradle file
-
java.lang.NoSuchFieldError: listAllMaterials
kiou.23 replied to DaysofKnight's topic in Support & Bug Reports
1.12.2 is no longer supported Please update to a modern version of minecraft to receive support- 1 reply
-
- 1
-
oh, I see no, if you to modify the behaviour you need to create your own furnace class, Tile Entity, Container, Screen and Block and handle all your logic from there at the moment you are simply creating a new vanilla furnace, and you can't do that kind of modification from there if you want some examples, this repository has some on how to create custom tile entities: minecraftbyexample/mbe31_inventory_furnace
-
how did you make the block? post your code
-
in the Tile Entity, just constantly keep cooking whatever the input is, instead of checking for fuel, I don't see what the issue would be. honestly, making a furnace which needs fuel seems harder than one that doesn't maybe you could be more specific on what you're not able to accomplish, so we can help you
-
what's the unexpected issue? post the complete error what have you tried so far? in what version are you? with which mods?
-
That's what I get from blindly copy pasting my own code... Thanks for pointing that one out!
-
which kind of recipe? you can get the recipe for an inventory through World#getRecipeManager()#getRecipe the implementation logic is not that complicated, but you will need to handle decreasing the stacks, shift-clicking, checking for container items, and serialization yourself
-
I have 6 entities which all should render with obj models, I am registering the renderers in the client setup, but the models are not showing up correctly. I feel it must be a dumb mistake I made, but I am unable to find what it could be, I'd appreciate help the client setup listener: github/jvcmarcenes/dicehoard/client/ClientEventHandler.java#L42 the entity renderer: github/jvcmarcenes/dicehoard/client/renderer/DiceRenderer.java currently all my entities are rendering with the dsix.obj model
-
you need to set it's render type to cutout you do so in the client setup, through RenderTypeLookup.setRenderLayer
-
looks like it should work, are you sure sdd:straw and sdd:jerry_nest are the correct registry names for your items? if they are, make sure the recipe is under resources/assets/data/sdd/recipes/ also: "sdd" is too short for a mod id, use something more unique EDIT: oh, nevermind, you've set the count as a string and not an integer, that's the issue
-
I think that what you want can be solved with Layer Renderers. (I think, I'm not quite sure wha you want really) extend Layer Renderer for the PlayerEntity and PlayerModel generic type parameters, and then override the render method. the layer renderer will always try to render, so you'll need to handle the condition logic of wether it should render or not. to "register" this, just an instance of the layer to the player's renderer in the RenderPlayer event
-
Resource pack block model see through problem
kiou.23 replied to SchwarzerRidder's topic in Modder Support
are you making a forge mod or just a resource pack? -
it seems your problem is solved, but just a tip: when posting code to the forums, use the code block instead of the spoiler, it provides indendation and monospaced fonts which make the code actually readable
-
it depends on wether you want the vanilla water bottle always return en empty water bottle (for any recipe that uses a water bottle), or if there is some specific recipes from your mod that you want that behaviour on for the latter, the solution is using Special Recipes, you can look at the Book or Map cloning recipes for some example. you'll need to override the getRemainingItems method, and perform such logic there
-
[1.16.5-36.1.0]Are there some new or changed APIs than before?
kiou.23 replied to Li_plum's topic in Modder Support
refer to this statement on the changed names: http://cpw.github.io/MinecraftMappingData.html if you want to use the old mappings you just need to change the "mappings channel" property in your build.gradle change the channel to "snapshot", and the version to "20210309-1.16.5" -
I'm not sure what you mean by copying the vanilla code. I believe you can just call World#setBlockState (in mcp mappings)
-
instead of listening for the RightClickBlock event, why not override the onItemUse (or something like it, there's a method that gets called when an item is used on a block), method on your kettle item? and handle the logic from there
-
Error with adding listener to Capability
kiou.23 replied to Babelincoln1809's topic in Modder Support
Instead of subscribing event listeners like this: MinecraftForge.EVENT_BUS.addListener(CoolDownHandler::onAttachCapabilities); MinecraftForge.EVENT_BUS.addListener(CoolDownHandler::doCoolDown); you can annotate the event listener class with @Mod.EventBusSubscriber() and then anotate the event listener methods with @SubscribeEvent that is not the only way to do it, but it is the one I find easier, and it should solve your listener issue for documentation on events you can check out: https://mcforge.readthedocs.io/en/latest/events/intro/ or: https://forge.gemwire.uk/wiki/Events#Event_Listeners -
[1.16.5]How could i create a tileentity for my custom furnace?
kiou.23 replied to zKryle's topic in Modder Support
go through the code, understand it, and once you know how the code works, you'll know what to change making the Tile Entity is quite trivial, but making custom recipes can be very annoying, for my implementation of a custom crafting like recipe, I just copy and pasted the vanilla class, and went changing what I needed 1- you'll need a recipe class, that keeps track of what the recipe actually is, and checks if a given inventory has the ingredients to match it. this implements IRecipe, you can then go through the logic of the overrides and add any other method that you may need. the IRecipe is generic, you need to give it the type of your custom inventory (which I'll talk about in step 4) 2- a serializer, that reads json files and creates new instances of your recipe class. this is very boilerplaity, and the best way to learn how to write this is looking at the vanilla code, there are 3 methods you'll need to overwrite, two for packet buffer serialization (this data works kinda like a queue, so you have to make sure you read things in the same order you wrote them). and one for dealing with json deserialization (you can use of JSONUtils from net.minecraft.util, and com.google.gson) 3- and an inventory, to keep the items. this is just a wrapper which extends IInventory, you shouldn't use IInventories for much since the capability system is preferred, but IRecipe requires it. 4- you'll need to register the recipe type through IRecipeType.register, in the RecipeSerializers registration event. and register the recipe serializer (preferrebly through a deferred register) 5- Optional: if you want to generate the recipe files with data generation, you'll have to write a Builder and an IFinishedRecipe which serializes the recipe to a json file -
[1.16.x] How to register custom signs using Deferred Registries?
kiou.23 replied to Quaint34's topic in Modder Support
he meant RegistryObject#get, but if you don't know what that message means you shold take some time to learn java first. your Sign BlockItem takes references to an Item, not to an RegistryObject, RegistryObjects work like Suppliers, you create them statically, you need to call .get() on the instance to get the object that it supplies. note that RegistryObjects only get populated after the registration events, therefore you can't call them before that (such as in statically initialization) registering custom signs is not a simple task, I had to go through it a while ago, I can point you towards the topic I made on this thread on some of the errors I was getting: https://forums.minecraftforge.net/topic/96417-solved-116-custom-sign-wont-render/ -
it does feel more complicated than what I may need, since my entity isn't actually a mob with animations and all that, just a static obj model would work, but I guess that if I go through and read how lycanitesmobs does it, I'll be able to extract what I need, thanks for the reference
-
wasn't TEST for item stacks, or tile entities? I know I have to extend an EntityRenderer, but I don't know how to get an obj to render from there