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


  • Posts

  • Joined

  • Last visited

Everything posted by Drachenbauer

  1. There is something about DecoratedFeatureConfig. It looks like, it get´s flowers to place, that came into the biome this way But i don´know, how to get my tulips with DecoratedFeatureConfig into the biomes... Actualy i use BlockClusterFeatureConfig.
  2. IGrowable is only used by plant-blocks with multiple grow-states. And not by the flowers.
  3. I looked into that item, but saw nothing about the flower-blocks there...
  4. Another question: how do i make bone meal spawn my tulips in theese biomes?
  5. You answered, while i edited my post: Now i found the solution: Theese lines: public static final DeferredRegister<Block> BLOCKS = new DeferredRegister<>(ForgeRegistries.BLOCKS, Reference.MOD_ID); and public static final DeferredRegister<Item> ITEMS = new DeferredRegister<>(ForgeRegistries.ITEMS, Reference.MOD_ID); needed to be in the separate classes, too. Now it works.
  6. Hello I have a problem with my inflateble entity: With a method, that i found a the enderdragon, imade him bounce me away in the moment of inflating. But if he is inflated, i can glitch through him... If i press F3+B i see his bigger bounding-box, if he is inflated. Here is my actual code for this behavior:: @Override public void livingTick() { if (timeUntilDeflating > 0) { timeUntilDeflating--; if (timeUntilDeflating == 0) { isInflated = false; AxisAlignedBB aabb = this.getBoundingBox(); this.setBoundingBox(new AxisAlignedBB(aabb.minX + 0.5d, aabb.minY, aabb.minZ + 0.5d, aabb.maxX - 0.5d, aabb.maxY - 1.0d, aabb.maxZ - 0.5d)); } } else { super.livingTick(); } } @Override public void onCollideWithPlayer(PlayerEntity entityIn) { if (timeUntilDeflating == 0) { timeUntilDeflating = 80; isInflated = true; AxisAlignedBB aabb = this.getBoundingBox(); this.setBoundingBox(new AxisAlignedBB(aabb.minX - 0.5d, aabb.minY, aabb.minZ - 0.5d, aabb.maxX + 0.5d, aabb.maxY + 1.0d, aabb.maxZ + 0.5d)); this.collideWithEntities(this.world.getEntitiesInAABBexcluding(this, this.getBoundingBox().grow(0.5D, 0.5D, 0.5D).offset(0.0D, 0.0D, 0.0D), null)); } } private void collideWithEntities(List<Entity> entities) { double d0 = (getBoundingBox().minX + getBoundingBox().maxX) / 2.0D; double d1 = (getBoundingBox().minZ + getBoundingBox().maxZ) / 2.0D; for(Entity entity : entities) { if (entity instanceof LivingEntity) { double d2 = entity.getPosX() - d0; double d3 = entity.getPosZ() - d1; double d4 = d2 * d2 + d3 * d3; entity.addVelocity(d2 / d4 * 4.0D, (double)0.2F, d3 / d4 * 4.0D); } } } } My idea now is, tha something in super.livingTicks makes the boundingbox work. How can i make him stay in his actual position and rotation, while inflates, but without stopping to use super.livingTicks? Another question: How nust i modify the last calculation here, that i bounce less far away from him (about the half distance is enough)?
  7. I also think, biomes in mods may have the tulips added a bit different to the vanila-ones. This can make it more difficult to check all biomes, that may appear in mods... I also have a new question: Can i have my block and item-registries separated into two init-classes? In the vanila-code has a class Items, where all items are initialized. And a class Blocks, where all blocks are initialized. I have similar classes in my mod, too. So i thaught, i can put the block-registrys into my blocks-class and the item-registrys in my items-class. But now i get an error: How can i make theese registrys work, if they are in separate classes? Edit: Now i found the solution: Theese lines: public static final DeferredRegister<Block> BLOCKS = new DeferredRegister<>(ForgeRegistries.BLOCKS, Reference.MOD_ID); needed to be in the separate classes, too.
  8. In a wiki i saw, there are only 3 biomes, wich contain tulips. If this is right, i think, i just can three times call my method and give theese biomes as arguments.
  9. Now i have this: DeferredWorkQueue.runLater(() -> { System.out.println("Blumenliste:"); for (Biome biome : Biome.BIOMES) { /*if (biome.getFlowers().contains(o)) { }*/ System.out.println(biome); System.out.println(biome.getFlowers()); } addModTulips(Biomes.FLOWER_FOREST); System.out.println("FLOWER_FOREST:"); System.out.println(Biomes.FLOWER_FOREST); System.out.println(Biomes.FLOWER_FOREST.getFlowers()); } ); and in the console i found this: This looks like Flower Forwst does not appear in the biomes-list... and i still don´t know, what i should place intead of the "flower" in this code: if (biome.getFlowers().contains(flower)) { } to check, if it for sample contains red tulips... Edit: in a Minecraft wiki, i saw, that tulips only appear in Plains, Sunflower Plains and Flower Forest. Is this right? If Yes, i simply can use 3 lines of my methode-call with theese biomes given as param.
  10. Now i try this to check for tulips: DeferredWorkQueue.runLater(() -> { for (Biome biome : Biome.BIOMES) { /*if (biome.getFlowers().contains(o)) { }*/ System.out.print(biome.getFlowers()); } addModTulips(Biomes.FLOWER_FOREST); } ); At first i want to use an output to see, how the content of the flower-list looks. But i find no result in the console... Do i just not know, where in the console output i have to find output from the common-setup? Or is there any reason, that this gives no output? In another mod i used this output-command in a model-class and found it´s output in the console.
  11. private static final BlockState DANDELION = Blocks.DANDELION.getDefaultState(); I mean code-lines like this for the tulips. This sample is the one for the dandelion and is located in the DefaultBiomeFeatures.. Or can i write my own into my code? Now i´fe written my own lines of this. How can i now make only my code generate tulips in the biomes? I want to use my code for all biomes with tulips. My idea is to use the set BIOMES in the class Biome and make a for-loop, that goes through the biomes: for (Biome biome : Biome.BIOMES) { } And inside therei want to check for tuips in the biomes and if yes, use my code.. For this i have a question How can i check, if a biome has tulips?
  12. Now it works. I created a new flower forest world and started directly in a patch of my own black tulips. Now i just have to register the other tulips to biome the same way. Edit: Now i modifyed my Config-line for the biome, that it makes patches with a mix of all my tulip-colors. Now i hace some more questions: Where are the Blockstates from the vanilla-tulips? I want to add them to my mixed tulip patches, too. How can i make, that only my code adds tulips to the biomes?
  13. Now i get an error: In the error i found a line, that says "Duplicate registration purple_tulip" I wonder where this registration is duplicated... This is now my main-class: Edit: i think i found it now, saw, that the yellow tulip at the blocks registry had the registry name "purple_tulip". fixed it now and test it
  14. Now i register my blocks and items like shown in the sample in the "DeferredRegister"-class. Can i remoce the integrated "RegistryEvents"-class from my main-class, if i finished the new way to register my stuff? Can i put the lines for the single blocks and items, like: public static final RegistryObject<Block> BLACK_TULIP_BLOCK = BLOCKS.register("black_tulip", () -> new FlowerBlock(Effects.WEAKNESS, 9, Block.Properties.create(Material.PLANTS).doesNotBlockMovement().hardnessAndResistance(0f).sound(SoundType.PLANT))); into my blocks- and items-classes, where i already had them listed?
  15. Do you mean the lines for making the tulips transparent should be in client? I thaught, you mean my biome-thing. where else should i initialize them?
  16. some posts above, an user told me to work in common. If i registered my blocks wrong, why i can place them in a world and plant the tulips in pots ?
  17. now i found, what i looked for. time for a test in a world with a flowerforest biome nearby. Edit: this is now my main-class: I made a method, that should ad my tulips to the flowerforest biome. For a first test, it only includes the black tulip now. But as i created a flower-forest-world, i cannot find any black tulips in there...
  18. Now i have this in my FMLCommonSetupEvent: DeferredWorkQueue.runLater(() -> { addModTulips(biomeIn); } ); But i´m not sure, how to put a specific biome into my method-call... I don´t know, where the methods are called, wich i found in DefaultBiomeFeatures... I must find this to see how a biome is given in there... should i do it as a new instance of the biome-class?
  19. I´m not sure, how to use DeferredWorkQueue Should i make a method like in DefaultBiomeFeatures and call it in the FMLCommonSetupEvent.
  20. Hello I have created my own tulips to compleete a 16 colors set. I can put them on the ground and into a flowerpot. But how do i add them to s vanilla-biome? I don´t know, where in that huge vanilla-code library i can find the matching code...
  21. as i searched on google, how to change the collision-box of my entity.
  22. Hello One mod, i´m working on, does not load into the test-client... In the console i found this line: It looks like it tries to find the mods.toml directly in the main-folder of the exploded resources and not in the META_INF-folder, that is located inside there. From where comes the info, where the test-run has to search this file?
  23. How about this: @Override public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB bounds, List list, Entity entity) { AxisAlignedBB bounds1 = new AxisAlignedBB.setBounds(0.0F, 0.0F, 0.0F, 0.0625F, 1.0F, 1.0F); AxisAlignedBB bounds2 = new AxisAlignedBB.setBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.0625F); AxisAlignedBB bounds3 = new AxisAlignedBB.setBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0625F); AxisAlignedBB bounds4 = new AxisAlignedBB.setBounds(0.0F, 0.0F, 0.0F, 1.0F, 1 + 0.0625F, 1.0F); AxisAlignedBB bounds5 = new AxisAlignedBB.setBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); list = new List<AxisAlignedBB>(bounds1, bounds2, bounds3, bounds4, bounds5); super.addCollisionBoxesToList(world, x, y, z, null, list, entity); } I think, this creates your parts, puts them to a list and passes them to the super-method.
  24. the method is called in livingTick. I try something similar with an inflatable character, that should pusch other entitys away by colliding. So i use the call in livingTick, too, but it still not works...
  25. Bump: Now i found out, that i have to use recalculateSize(); there. But the bigger box doesn´t fit to his position... And if he is in water, he disappears after inflating (i was glitched into him, maybe that´s a reason, too) how do i fix this? Edit: now i use this to change his boundingbox: AxisAlignedBB aabb = this.getBoundingBox(); this.setBoundingBox(new AxisAlignedBB(aabb.minX + 0.5d, aabb.minY, aabb.minZ + 0.5d, aabb.maxX - 0.5d, aabb.maxY - 1.0d, aabb.maxZ - 0.5d)); I use it in "livengTick" and "onCollidewithPlayer" Now the key F3 + B shows his boundingbox matching his bodysize, but i can run through him... How do i make this boundingbox act as collisionbox and hitbox, too?
  • Create New...

Important Information

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