Jump to content

kiou.23

Members
  • Posts

    444
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by kiou.23

  1. you can look at how vanilla blocks that can be oriented implement that, I've looked at the furnace implementation when I learned it. in this case you should look at the quartz pillar block, or any log block
  2. can you give more detail?
  3. Block properties aren't meant to hold that amount of possible values. use tile entities instead
  4. what is the mc version? and what is it that you're trying to do? I didn't really understand you
  5. in your model json, set the parent to be the vanilla cake model
  6. check diesieben answer, he points to the GlobalLootModifier documentation, and tells you how to get the smelting recipe output for that item. additionally you may want to check if the block is an ore, for that you could use Tags.Blocks.ORES.contains()
  7. it is not the same error nor crash report. but if you want some help, you need to post the code
  8. try specifying the generic in your TE RegistryObject field, so that it is of type: RegistryObject<TileEntityType<TileEntityEnergizedFurnace>>
  9. I should've read the crashlog also, the error is something else. can you provide the rest of the code? or maybe link to a git repo
  10. TileEntityType.Builder.create(TileEntityEnergizedFurnace::new, BlockRegistryHandler.ENERGIZED_FURNACE) this method takes a Block for the second param, you're giving it a Registry Object (I assume)
  11. I think that the LayerRenderer is what you need. check for instance the ElytraLayer to get an example. in there just override the render method, check if the entity should have the layer rendered, and if it should, draw the objects (note that the rendering code is somewhat complicated, nothing that brute force won't fix) and then to "register" the layer, you can simply add a new instance of it to the player, under the RenderPlayerEvent (note: don't do this on the server side, only on the client side)
  12. you have examples in the vanilla source code, check the Shapeless or Shaped crafting recipe classes for instance. (not the builder classes, the builders are for the data generation, and since you are writing the jsons by hand, you won't need them) - you will need to register the serializer and use the registered instance in IRecipe#getSerializer. you can do this using deffered registers - you'll also need to register a recipe type, and use the registered instance in IRecipe#getType. there isn't a deffered register for recipe types, so you'll need to subscribe to the RecipeSerializer registry event and use IRecipeType#register, to register the recipe type - for IRecipe#getId you need to return the ResourceLocation that's passed to the class in the constructor. after that you can change the type in the json to match your recipe type name (e.g.: "mymod:myrecipetype") for the serializer class you'll need to handle writing and reading to packet buffers, and deserializing the json recipe's into an instance of the recipe. the vanilla classes have all examples you need to figure how these methods can be implemented.
  13. it should work with any smeltable ore, since you'd be checking for smelting recipes, and any modded smelting recipe is registered in the same place you'd be checking for. it would actually work for any block that can be smelted, so breaking sand with the pick would return glass. if that's not the desired behaviour, you can check if the block has the ore tag
  14. I'm thinking you could modify the vanilla loot tables to match for a tool that has your custom enchantment, and if they do, return the smelted item (maybe you can do so that for every block (or ore to optimize), you check if it is an ingredient to a smelting recipe, and modify that block's loot table to match?)
  15. what were the issues? and what did you read was necessary? so... you need to only call the object once it has been registered. such as in the common setup event you're calling the OreGenerator#register at two different moments in the code? The only thing that I can think is that you could refresh the gradle project... you did run the decompilation right? and here, if it helps, you can check one of my repos, it goes over registering Configured Features and all that: https://github.com/jvcmarcenes/effetewood edit: oh, and check my block registration class to see a possible way of automatizing BlockItem registration
  16. you got me confused, you can't install the 1.12.2 or the 1.16.5 version?
  17. you could have an invisible and uncolidable block that's placed on the players feet whenever they're holding the item, I think this is asolve to the original problem.
  18. You're calling OreGenerator#register on the constructor of your mod class, that is literally the first thing that runs when your mod is being loaded. by then none of the blocks (or anything else) has been registered yet. so when you try to use a block at that moment, it still doesn't exist. You want to register the features on common setup and just a few notes: - you should keep each feature in it's own field, instead of on an ArrayList (Sets are a better implementation than Lists in this case as well) - your BiomeLoadingEvent Handler has no need to have it's priority set to highest - you are registering all the nether and end ores in the overworld biomes - WHY ON EARTH are you using RegistryObject.of() to get your block??? you have a field in your BlockRegistryHandler that stores the RegistryEntry for the block - using "if (rb.get() != null)" to avoid errors is horrible coding practice. because then you won't get the desired outcome and won't even know why, if the block is null at that point, your code should CRASH, and there's nothing wrong with letting the code crash on development - what's the point of that try catch block on the register method even?... - you can automatize the registration of BlockItems, that will really save you some keystrokes - why did you write your own implementation of block cardinal? vanilla already has a implementation, look at what orientable blocks, such as the furnace extends EDIT: no clue on what's going on with the javadocs, they should be there. but I can't say much because I don't use eclipse
  19. Yeah, I've been told, I'l change it later I added the IRecipe before the RecipeType, so I made it return null and forgot about it...
  20. I have a class that extends IRecipe, with it's own serializer and builder. I'm registering the Serializer with a deferredRegister, and I'm registering the recipe type by calling IRecipeType.register in the registry event for the recipe serializers. I'm generating a file using the recipe builder, it works fine. but whenever I try to load a world it gives the following error: https://gist.github.com/jvcmarcenes/0ef3c7b8eeabf94efce04fd40215cafa this is the recipe file (generated [main]/resources/data/minecraft/recipes/diamond_mod_recipe.json): { "type": "tca:mod_shaped", "energy_cost": 100, "pattern": [ "ddd", "dgd", "ddd" ], "key": { "d": { "item": "minecraft:dirt" }, "g": { "item": "minecraft:gold_block" } }, "result": { "item": "minecraft:diamond" } } and this is the generated file fot the criterion (generated [main]/resources/data/minecraft/advancements/recipes/misc/diamond_mod_recipe.json): { "parent": "minecraft:recipes/root", "rewards": { "recipes": [ "minecraft:diamond_mod_recipe" ] }, "criteria": { "has_item": { "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { "item": "minecraft:gold_block" } ] } }, "has_the_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { "recipe": "minecraft:diamond_mod_recipe" } } }, "requirements": [ [ "has_item", "has_the_recipe" ] ] }
  21. Minecraft calls Item#getContainerItem() when crafting to see what to let on the crafting bench, you can override the method in your subclass and return the stack you're passed, damaged
  22. instead of a supplier, use the TileEntityType Builder
  23. it's not a Null Pointer Exception (no clue where you got the idea that it was...) it's an Stack Overflow Error. that usually means that you have a funcion that is forever calling itself, in an endless recursive loop. if you look at the log it tells you exactly what function is being called: OnEntityJoinWorldEvent#EntityJoinWorld() that event handler calls World#addEntity, but whenever an entity is added to the world, it fires the EntityJoinWorldEvent (an you're listening to that event and calling World#addEntity... see the loop?)
  24. you add your block to the walls tag group. you can add the json by hand (under resources/data/minecraft/tags/blocks), but as it seems you're using data generators already, forge has a BlockTagsProvider which you can extend and override the method registerTags(). in there you can call the helper method getOrCreateBuilder(), and pass the tag group you want, should be under net.minecraft.tags.BlockTags. with the builder you can call add(), and pass a reference to your block (or blocks). for the item, you need the parent of the item model to be of the inventory model, not the block model. you're using withExistingParent() and calling the model that you're generating for the block. but that's not the model you want. minecraft should have a model under models/block for the wall_inventory (something like that, I know that for buttons it is models/block/button_inventory). then you can chain .texture(), and set the "texture" attribute to have the texture of your block. ps.: this kind of posts really should go under Modder Support, not Support & Bug Reports
  25. he did say his drivers were up to date "Minidumps are not enabled by default on client versions of Windows" seems to be a know problem with the jvm https://stackoverflow.com/questions/61865938/java-minidumps-are-not-enabled-by-default-on-client-versions-of-windows this stackoverflow thread goes over some possible fixes
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.