Jump to content

Villfuk02

Members
  • Posts

    301
  • Joined

  • Last visited

Everything posted by Villfuk02

  1. and how exatly do i modify it - do i subscribe some event, that generates the chests and do something with it there?
  2. I'd like to make my items generate in dungeon chests, but i don't know how. I probably need to somehow extend loot tables, but how? thanks for any help
  3. I tried to make it as simple as i could: { "multipart": [ {"apply": { "model": "half_slab_stone"} } ] } still shows nothing and YES the file is located in blockstates
  4. i have made my own pumpkin, with seeds and stem but the model for the stem when bent towards pumpkin doesn't work - it shows magenta/black cube. in code i did everything like vanilla pumpkin so the problem must be with blockstate or model Blockstate: { "variants": { "age=0,facing=up": { "model": "archeology:emerald_pumpkin_stem_growth0" }, "age=1,facing=up": { "model": "archeology:emerald_pumpkin_stem_growth1" }, "age=2,facing=up": { "model": "archeology:emerald_pumpkin_stem_growth2" }, "age=3,facing=up": { "model": "archeology:emerald_pumpkin_stem_growth3" }, "age=4,facing=up": { "model": "archeology:emerald_pumpkin_stem_growth4" }, "age=5,facing=up": { "model": "archeology:emerald_pumpkin_stem_growth5" }, "age=6,facing=up": { "model": "archeology:emerald_pumpkin_stem_growth6" }, "age=7,facing=up": { "model": "archeology:emerald_pumpkin_stem_growth7" }, "facing=west": { "model": "archeology:emerald_pumpkin_stem_fruit" }, "facing=east": { "model": "archeology:emerald_pumpkin_stem_fruit", "y": 180 }, "facing=north": { "model": "archeology:emerald_pumpkin_stem_fruit", "y": 90 }, "facing=south": { "model": "archeology:emerald_pumpkin_stem_fruit", "y": 270 } } } model emerald_pumpkin_stem_fruit { "parent": "block/stem_fruit", "textures": { "stem": "archeology:blocks/emerald_pumpkin_stem_disconnected", "upperstem": "archeology:blocks/emerald_pumpkin_stem_connected" } } why does it not work? btw i'm getting this model loading error (one of them) [19:29:27] [Client thread/ERROR] [FML]: Exception loading model for variant archeology:emerald_pumpkin_stem#age=4,facing=north for blockstate "archeology:emerald_pumpkin_stem[age=4,facing=north]" net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model archeology:emerald_pumpkin_stem#age=4,facing=north with loader VariantLoader.INSTANCE, skipping at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?] at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:249) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:153) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:237) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:154) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:132) [SimpleReloadableResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:113) [SimpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:800) [Minecraft.class:?] at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:359) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:562) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:387) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_111] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_111] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_111] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_111] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_111] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_111] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_111] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_111] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:78) ~[ModelBlockDefinition.class:?] at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1241) ~[ModelLoader$VariantLoader.class:?] at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?] ... 24 more It looks like there should be variants for all ages in the blockstate file, but vanilla pumpkin_stem blockstate doesn't have it and it works without an error thanks for any help
  5. I tried this: if (worldIn instanceof WorldServer) { WorldServer worldserver = (WorldServer)worldIn; Utils.getLogger().info(particle); if (particle) spawnBonemealParticles(worldserver, alterPos, 15); } public static void spawnBonemealParticles(World worldIn, BlockPos pos, int amount) { for(int i = 0; i < amount + 1; i++){ worldIn.spawnParticle(EnumParticleTypes.VILLAGER_HAPPY, ((double)pos.getX()) + worldIn.rand.nextDouble(), ((double)pos.getY()) + worldIn.rand.nextDouble(), ((double)pos.getZ()) + worldIn.rand.nextDouble(), 0.0, 0.5, 0.0, new int[0]); } } But it still doesn't spawn the paticles Everything triggers how would i expect it, but no particles
  6. So... am i supposed to use WorldSever? Or what??? I don't understand how is the command working
  7. I have a problem: I am testing something on server side and i want to create particles if it succeeded - how can i send it to the client?
  8. the adress of the file is src/main/resources/assets/archeology/blockstates/metal_detector.json am i supposed to specify somewhere it is'nt model but blockstate, or what?
  9. ok, so what am i supposed to do when i can't use multipart? because i don't want to write over 10 000 combinations using predicates and one model for each one
  10. and it looks for it, whats wrong? i don't get your response
  11. so, i adjusted the files and the file for the detector now looks like this: { "multipart": [ {"apply": { "model": "archeology:detector/base"} } ], "display": { "head": { "rotation": [ 0, 90, 0 ], "translation": [ 0, 29, 0 ], "scale": [ 2.8, 2.8, 2.8 ] }, "gui": { "rotation": [ 30, 310, 0 ], "translation": [ 0, 1, 0], "scale":[ 1.325, 1.325, 1.325 ] }, "ground": { "rotation": [ 0, 0, 0 ], "translation": [ 0, 3, 0], "scale":[ 0.25, 0.25, 0.25 ] }, "fixed": { "rotation": [ 0, 0, 0 ], "translation": [ 5, 5, 0], "scale":[ 1.6, 1.6, 1.6 ] }, "thirdperson_righthand": { "rotation": [ 83, 90, -10 ], "translation": [ 0, 8, -3], "scale": [ 1.4, 1.4, 1.4 ] }, "thirdperson_lefthand": { "rotation": [ 83, 270, 10 ], "translation": [ 0, 8, -3], "scale": [ 1.4, 1.4, 1.4 ] }, "firstperson_righthand": { "rotation": [ 45, 90, 0 ], "translation": [ -4, 7, -1 ], "scale": [ 1.5, 1.5, 1.5 ] }, "firstperson_lefthand": { "rotation": [ 45, 270, 0 ], "translation": [ -4, 7, -1 ], "scale": [ 1.5, 1.5, 1.5 ] } } } and in folder models/block/detector i have file named base.json looking like this: { "textures": { "0": "blocks/iron_block", "1": "blocks/gold_block", "2": "blocks/anvil_base" }, "elements": [ { "name": "Coil1", "from": [ 6.5, 0.0, 6.5 ], "to": [ 7.5, 1.0, 8.5 ], "faces": { "north": { "texture": "#0", "uv": [ 1.0, 1.0, 4.0, 4.0 ] }, "east": { "texture": "#0", "uv": [ 1.0, 1.0, 7.0, 4.0 ] }, "south": { "texture": "#0", "uv": [ 1.0, 1.0, 4.0, 4.0 ] }, "west": { "texture": "#0", "uv": [ 1.0, 1.0, 7.0, 4.0 ] }, "up": { "texture": "#0", "uv": [ 1.0, 1.0, 7.0, 4.0 ], "rotation": 90 }, "down": { "texture": "#0", "uv": [ 1.0, 1.0, 7.0, 4.0 ], "rotation": 90 } } }, { "name": "Coil2", "from": [ 7.5, 0.0, 6.5 ], "to": [ 9.5, 1.0, 7.5 ], "faces": { "north": { "texture": "#0", "uv": [ 1.0, 1.0, 7.0, 4.0 ] }, "east": { "texture": "#0", "uv": [ 1.0, 1.0, 4.0, 4.0 ] }, "south": { "texture": "#0", "uv": [ 1.0, 1.0, 7.0, 4.0 ] }, "west": { "texture": "#0", "uv": [ 1.0, 1.0, 4.0, 4.0 ] }, "up": { "texture": "#0", "uv": [ 1.0, 1.0, 7.0, 4.0 ], "rotation": 180 }, "down": { "texture": "#0", "uv": [ 1.0, 1.0, 7.0, 4.0 ] } } }, { "name": "Coil3", "from": [ 8.5, 0.0, 7.5 ], "to": [ 9.5, 1.0, 9.5 ], "faces": { "north": { "texture": "#0", "uv": [ 1.0, 1.0, 4.0, 4.0 ] }, "east": { "texture": "#0", "uv": [ 1.0, 1.0, 7.0, 4.0 ] }, "south": { "texture": "#0", "uv": [ 1.0, 1.0, 4.0, 4.0 ] }, "west": { "texture": "#0", "uv": [ 1.0, 1.0, 7.0, 4.0 ] }, "up": { "texture": "#0", "uv": [ 1.0, 1.0, 7.0, 4.0 ], "rotation": 270 }, "down": { "texture": "#0", "uv": [ 1.0, 1.0, 7.0, 4.0 ], "rotation": 270 } } }, { "name": "Coil4", "from": [ 6.5, 0.0, 8.5 ], "to": [ 8.5, 1.0, 9.5 ], "faces": { "north": { "texture": "#0", "uv": [ 1.0, 1.0, 7.0, 4.0 ] }, "east": { "texture": "#0", "uv": [ 1.0, 1.0, 4.0, 4.0 ] }, "south": { "texture": "#0", "uv": [ 1.0, 1.0, 7.0, 4.0 ] }, "west": { "texture": "#0", "uv": [ 1.0, 1.0, 4.0, 4.0 ] }, "up": { "texture": "#0", "uv": [ 1.0, 1.0, 7.0, 4.0 ] }, "down": { "texture": "#0", "uv": [ 1.0, 1.0, 7.0, 4.0 ], "rotation": 180 } } }, { "name": "Rod", "from": [ 6.3, 1.0, 7.5 ], "to": [ 7.3, 11.0, 8.5 ], "rotation": { "origin": [ 8.0, 1.0, 8.0 ], "axis": "z", "angle": 22.5 }, "faces": { "north": { "texture": "#1", "uv": [ 1.0, 0.0, 5.0, 16.0 ] }, "east": { "texture": "#1", "uv": [ 1.0, 0.0, 5.0, 16.0 ] }, "south": { "texture": "#1", "uv": [ 1.0, 0.0, 5.0, 16.0 ] }, "west": { "texture": "#1", "uv": [ 1.0, 0.0, 5.0, 16.0 ] }, "up": { "texture": "#1", "uv": [ 1.0, 1.0, 5.0, 5.0 ] }, "down": { "texture": "#1", "uv": [ 4.0, 4.0, 8.0, 8.0 ] } } }, { "name": "Handle1", "from": [ 5.0, 5.0, 7.0 ], "to": [ 7.0, 6.0, 9.0 ], "faces": { "north": { "texture": "#2", "uv": [ 0.0, 0.0, 8.0, 4.0 ] }, "east": { "texture": "#2", "uv": [ 0.0, 0.0, 8.0, 4.0 ] }, "south": { "texture": "#2", "uv": [ 0.0, 0.0, 8.0, 4.0 ] }, "west": { "texture": "#2", "uv": [ 0.0, 0.0, 8.0, 4.0 ] }, "up": { "texture": "#2", "uv": [ 0.0, 0.0, 8.0, 8.0 ] }, "down": { "texture": "#2", "uv": [ 0.0, 0.0, 8.0, 8.0 ] } } }, { "name": "Handle2", "from": [ 0.8, 8.8, 7.4 ], "to": [ 3.8, 10.0, 8.6 ], "faces": { "north": { "texture": "#2", "uv": [ 0.0, 0.0, 12.0, 4.0 ] }, "east": { "texture": "#2", "uv": [ 0.0, 0.0, 4.0, 4.0 ] }, "south": { "texture": "#2", "uv": [ 0.0, 0.0, 12.0, 4.0 ] }, "west": { "texture": "#2", "uv": [ 0.0, 0.0, 4.0, 4.0 ] }, "up": { "texture": "#2", "uv": [ 0.0, 0.0, 12.0, 4.0 ] }, "down": { "texture": "#2", "uv": [ 0.0, 0.0, 12.0, 4.0 ] } } } ] } But it doesn't render at all AGAIN is it because the "display": parameters are in wrong file, or is the blockstate wrong, or the model, or WHAT?
  12. thank you, i wouldn't be able to figure this out myself. Yaaay, now it shows magenta/black cube!!!
  13. please help me, idk what's wrong here
  14. I have item called metal_detector and it has lots of different parts kinda like TConstruct tools and i want to make multipart model for it, but it somehow shows nothing - not the magenta/black cube, but nothing at all This is the model i'm using now: { "multipart": [ {"apply": { "model": "archeology:detector_base"} }, {"apply": { "model": "archeology:item/detector_base"} }, {"when": {"found": "0.0"}, "apply": { "model": "archeology:item/detector_not_found"} }, {"when": {"found": "1.0"}, "apply": { "model": "archeology:item/detector_found"} } ], "display": { "head": { "rotation": [ 0, 90, 0 ], "translation": [ 0, 29, 0 ], "scale": [ 2.8, 2.8, 2.8 ] }, "gui": { "rotation": [ 30, 310, 0 ], "translation": [ 0, 1, 0], "scale":[ 1.325, 1.325, 1.325 ] }, "ground": { "rotation": [ 0, 0, 0 ], "translation": [ 0, 3, 0], "scale":[ 0.25, 0.25, 0.25 ] }, "fixed": { "rotation": [ 0, 0, 0 ], "translation": [ 5, 5, 0], "scale":[ 1.6, 1.6, 1.6 ] }, "thirdperson_righthand": { "rotation": [ 83, 90, -10 ], "translation": [ 0, 8, -3], "scale": [ 1.4, 1.4, 1.4 ] }, "thirdperson_lefthand": { "rotation": [ 83, 270, 10 ], "translation": [ 0, 8, -3], "scale": [ 1.4, 1.4, 1.4 ] }, "firstperson_righthand": { "rotation": [ 45, 90, 0 ], "translation": [ -4, 7, -1 ], "scale": [ 1.5, 1.5, 1.5 ] }, "firstperson_lefthand": { "rotation": [ 45, 270, 0 ], "translation": [ -4, 7, -1 ], "scale": [ 1.5, 1.5, 1.5 ] } } } Btw the value FOUND is predicate i made the item return with this: this.addPropertyOverride(new ResourceLocation("found"), new IItemPropertyGetter(){ @Override public float apply(ItemStack stack, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) { IDetector detector = stack.getCapability(DetectorProvider.DETECTOR_CAP, null); if (detector.getFound()) return 1.0f; return 0.0f; } }); thx for any help
  15. WAT? still doesn't work: public class QuartzKnife extends Item { public QuartzKnife(String unlocalizedName){ this.setUnlocalizedName(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setMaxStackSize(1); this.setMaxDamage(256); } @Override public boolean hasContainerItem(ItemStack stack) { return true; } @Override public ItemStack getContainerItem(ItemStack itemStack) { itemStack.setItemDamage(itemStack.getItemDamage() + 1); return super.getContainerItem(itemStack); } }
  16. I want my item to stay in crafting and decrease its durability when used in recipe - not just be consumed how can i do it?
  17. Thanks, i made it so the item consumes the xp straight from the player's XP bar when he uses it
  18. I've figured out that the method isn'T even called unless both slots contain items What Am I Supposed To Do?
  19. AIR doesn't have item and if it had, i would want me to place in the second slot air I tried .isEmpty() that should do something, but as i said the anvil doesn't like when the slot is empty. at least you tried...
×
×
  • Create New...

Important Information

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