Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

KillBill61's Achievements

Tree Puncher

Tree Puncher (2/8)



  1. I changed it so it probably eliminate some future problems but it actually didn't change anything. I changed this: "AutoTrees" "ModSetup.java" "ChoppingBlock.java" "ChoppingBlockItem.java" "AutomationItemGroup" is same because I can't use it with @ObjectHolder and calling its constructor multiple time means multiple tabs in game. Just screenshot of my blocks (still same as before changes). Don't mind my texture - just trying how it looks in game + information about what is which side. You can see that placed block don't have texture and the blockitem has texture. This is "chopping_block.json" in "assets.automation.models.item" Also can you be more decent? I know you try to help me but you are constantly swearing at me and it makes me sad You know you can write it without it.
  2. Fine I do it again. This is current status. I included everything that is part of it. "chopping_block.json" in "assets.automation.blockstates" "chopping_block.json" in "assets.automation.models.blocks" "chopping_block_powered.json" in "assets.automation.models.blocks" "AutoTrees.java" "ChoppingBlock.java" "ChoppingBlockItem.java" "AutomationItemGroup.java" "ModSetup.java" I wanted include debug file but it is too long - only errors and warnings is this: Question and problem: Block has default purple/black texture so it didn't load. What am I doing wrong?
  3. Dude I am new... don't do that. Than answer me why forge doesn't work when my blockstate and model is ok. I can't explain it and don't know how to fix it.
  4. Well - yes But the question is should it work with the basic forge I downloaded as I wrote or I need some other plugin, files that I missed? I can't find anything.
  5. I am not saying it is 'error'. I am saying that line is telling that it should use that "enchanted scripting" where you don't have to use "vanilla scripting" and make all the combinations by yourself. I am saying that the reason why I have these errors is because it is not using that "forge_marker" ("enchanted scripting") and instead it is using "vanilla scripting" and that is why it shows these errors. Btw so much thanks to you that you are wasting time with me I appreciate it. If anybody don't know where is the problem (I even download whole forge again) there is probably end and I am stucked with "vanilla" while I am making blockstates files. Just pray for me if some of my future blocks will have 5 states with 10 values and I have to create all combinations
  6. Am I using the "forge_marker": 1, correctly? I mean... I do this for MC version 1.15.1 and the forge version is 30.0.15 I have feeling that it completely ignores this line, because with or without it it do always the same things and it would make sense why it shows these errors. I downloaded it from forge page and normally followed instructions and everything works except this. Or do I need something else that is not included in my files or code?
  7. So for testing I removed the "facing" and leave there only the "powered" Everything is same except my blockstates file: and in my ChoppingBlock class I changed this: and this is the only problem it prints: I still don't know what to do... Also side question: When I use my first complicated code I can see my block that is black, white and red as should look, but for some reason when I hold it, it has same texture and look except one thing and that is that everything that should be red is white...
  8. what is wrong with it? again - everything is in my first comment btw - I am just resending it now
  9. Hi, still not working - I removed the "default" part because it is not necessary as I read (and it does nothing with my problem), but I made this: as my json file in blockstate (everything other is same - I only changed this file) and it doesn't load texture in game and I found this part that is probably why it does not work: Can you help me? I am totally lost I swear I am not that stoopid.
  10. Thx for the answers - the second one with "getStateForPlacement()" is much better than what I had. But I still don't know about the first one. When I do for example: { "variants": { "powered=false": { "model": "automation:blocks/chopping_block" }, "powered=true": { "model": "automation:blocks/chopping_block_powered" } } } it always face north and I still don't understand how should I do it "easily" so I don't have to define all 6 facing states. I want that my block acts for example as a furnace. Is there some easy way or I need to define all 6 facing states as I did firstly? I didn't get it from website you posted. How my json file have to look like?
  11. Hi, I have several questions about that, but let me first show you what I have (It works as I want, but I think I don't understand it well - the "powered" part is not finished, but that is not the problem - I just don't need it now). Questions are on bottom. (MODID = "automation") In "assets.automation.blockstates" I have file "chopping_block.json" In "assets.automation.models.blocks" I have "chopping_block.json" and also "chopping_block_powered.json" In "assets.automation.textures.blocks.chopping_block" folder there are all 12 PNG files with the right name. And in my "ChoppingBlock" class I have these methods (that I copied - I understand them easily btw) Questions: 1) Does file in "assets.automation.blockstates" have to be really that complicated? I mean that what texture it has to use is defined in files in "assets.automation.models.blocks". In the first file there are basically two states - when it is powered use this model and when it is not powered use this model. I tried to understand that "facing" parameter and "x" and "y" parameter but I don't understand why it has to be this way. 2) When I used to place my "ChoppingBlock" it always faced the same direction eg. north part of cube faced north etc. and it didn't matter from what position I placed it. So I added that part of code (onBlockPlaceBy), but I feel I am kinda cheating? I tried to copy code from chest or furnace or piston because these blocks always face to you when you place them but I didn't find the part in the code what causes it. How do you do it by "default" so I don't have to put this part of code into every block that has different textures on each side. Thx for everything btw
  12. Thank you! It works. Just one more thing you missed so I will write it here for others who has the problem. The json file that I named "chopping_block_loot_table.json" I had to rename to "chopping_block.json" because that is my register name for my custom block. There is no registration for loot tables that you need to have in your code. That's it thx you guys!
  13. Hi (I am kinda new to this) Simply my answer is: How do I make that my custom block* drops "itself" (BlockItem) when I mine it. Block and BlockItem are registered and they works in game (by "works" I mean they can exists). *My custom block doesn't have anything. It can be placed, it can be dropped from inventory, it can be destroyed, it can be found in tab in creative mode - basically it acts as cobblestone except the fact, it doesn't drop itself when it is destroyed* I found out that I need some "loot tables". So I created "chopping_block_loot_table.json" in src/main/resources/assets/automation/loot_tables/blocks/ and filled it with (my custom block has "chopping_block" as register name and my MODID is "automation"): "pools": [ { "rolls": 1, "entries": [ { "type": "minecraft:item", "name": "automation:chopping_block" } ] } ] and it doesn't work - It doesn't even detect that it was loaded when I did this: @EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.FORGE) public static class RegistryEventsForge { @SubscribeEvent public static void onLootTableLoad(LootTableLoadEvent evt) { System.out.println(evt.getName()); } } It shows all loot tables except my own. I couldn't find where I make mistake. I think I have to somehow register my loot table, but I don't know where should I do this in this 1.15.1 version. Probably I have to put somewhere " new ResourceLocation("automation:chopping_block_loot_table") ", but I don't know where (MODID = automation, chopping_block_loot_table is name of that json file)
  14. Thank you so much for perfect explanation ^^
  15. Thank you so much It was little hard to find the methods when you didn't write it as code, but I did it - thanks Just one question - I found that lot of people use "instanceof" rather than some method. For example - is there any difference in this? if(tmpEntity instanceof ItemEntity) {... and if(tmpEntity.getType() == EntityType.ITEM) {... Let's say there is no difference and I want to be effective. I read that calling method with comparison should be much quicker than calling "instanceof" in java. But when I want to know if block is plantable: if(block instanceof IPlantable) {... I don't have method for that and I need to use "instanceof" (if I don't want to list all plantable blocks - that is bad, because when I want to add new plant I have to manually put this plant into my list so this is not the way I want). To summarize questions: 1) Is there difference between the first two codes? 2) Should I use "instanceof" often or is there often some method that do the same thing?
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.