Jump to content

Drachenbauer

Members
  • Posts

    724
  • Joined

  • Last visited

Everything posted by Drachenbauer

  1. I got the way with static initializers from a tutorial of Harry Talks. My living entities work this way. I made my own abstract entity class for my own munition, because i want no commections between the arrows and my munition. I don´t know how else i can make it impossible to use my munition with the bow and normal arrows with my slingshot.
  2. Hello Actual i register my entities like this: RegistryEvent in the main-class: @SubscribeEvent public static void registerEntities(final RegistryEvent.Register<EntityType<?>> event) { event.getRegistry().registerAll(AngryBirdsEntities.RED, AngryBirdsEntities.CHUCK, AngryBirdsEntities.BLUES, AngryBirdsEntities.BOMB, AngryBirdsEntities.MATHILDA, AngryBirdsEntities.TERENCE, AngryBirdsEntities.SILVER, AngryBirdsEntities.BUBBLES, AngryBirdsEntities.HAL, AngryBirdsEntities.STELLA, AngryBirdsEntities.POPPY, AngryBirdsEntities.WILLOW, AngryBirdsEntities.DAHLIA, AngryBirdsEntities.LUCA, AngryBirdsEntities.ICE_BIRD); } Prepared entities in the entity-list-class: public static EntityType<?> RED = EntityType.Builder.create(RedEntity::new, EntityClassification.CREATURE).build(Reference.MOD_ID + ".red").setRegistryName("red"); public static EntityType<?> CHUCK = EntityType.Builder.create(ChuckEntity::new, EntityClassification.CREATURE).build(Reference.MOD_ID + ".chuck").setRegistryName("chuck"); public static EntityType<?> BLUES = EntityType.Builder.create(BluesEntity::new, EntityClassification.CREATURE).build(Reference.MOD_ID + ".blues").setRegistryName("blues"); public static EntityType<?> BOMB = EntityType.Builder.create(BombEntity::new, EntityClassification.CREATURE).build(Reference.MOD_ID + ".bomb").setRegistryName("bomb"); public static EntityType<?> MATHILDA = EntityType.Builder.create(MathildaEntity::new, EntityClassification.CREATURE).build(Reference.MOD_ID + ".mathilda").setRegistryName("mathilda"); public static EntityType<?> TERENCE = EntityType.Builder.create(TerenceEntity::new, EntityClassification.CREATURE).build(Reference.MOD_ID + ".terence").setRegistryName("terence"); public static EntityType<?> SILVER = EntityType.Builder.create(SilverEntity::new, EntityClassification.CREATURE).build(Reference.MOD_ID + ".silver").setRegistryName("silver"); public static EntityType<?> BUBBLES = EntityType.Builder.create(BubblesEntity::new, EntityClassification.CREATURE).build(Reference.MOD_ID + ".bubbles").setRegistryName("bubbles"); public static EntityType<?> HAL = EntityType.Builder.create(HalEntity::new, EntityClassification.CREATURE).build(Reference.MOD_ID + ".hal").setRegistryName("hal"); public static EntityType<?> STELLA = EntityType.Builder.create(StellaEntity::new, EntityClassification.CREATURE).build(Reference.MOD_ID + ".stella").setRegistryName("stella"); public static EntityType<?> POPPY = EntityType.Builder.create(PoppyEntity::new, EntityClassification.CREATURE).build(Reference.MOD_ID + ".poppy").setRegistryName("poppy"); public static EntityType<?> WILLOW = EntityType.Builder.create(WillowEntity::new, EntityClassification.CREATURE).build(Reference.MOD_ID + ".willow").setRegistryName("willow"); public static EntityType<?> DAHLIA = EntityType.Builder.create(DahliaEntity::new, EntityClassification.CREATURE).build(Reference.MOD_ID + ".dahlia").setRegistryName("dahlia"); public static EntityType<?> LUCA = EntityType.Builder.create(LucaEntity::new, EntityClassification.CREATURE).build(Reference.MOD_ID + ".luca").setRegistryName("luca"); public static EntityType<?> ICE_BIRD = EntityType.Builder.create(IceBirdEntity::new, EntityClassification.CREATURE).build(Reference.MOD_ID + ".ice_bird").setRegistryName("ice_bird"); How do i register a munition-entity (based on the arrow-entity) in a way, that i can put it into the RegistryEvent in the main-class, as well as the living entities?
  3. Hello Im trying to make a slingshot to use like the bow. How do i create a munition-entity (based on the arrow-entity), that uses a renderer-class and a model-class? I want to use my Angry Birds models from my living-entities for the munition too, just scale them down. Actual i´m trying to reproduce, how arrows are made in the original vanilla-code and rename them as my birds and than i thaught, i can use copies of the renderers and models, i use for my other Angry Birds, just put small numbers in the scale-method, i already use for some of them. Here is such a renderer class: package drachenbauer32.angrybirdsmod.entities.renderers; import com.mojang.blaze3d.platform.GlStateManager; import drachenbauer32.angrybirdsmod.entities.BluesEntity; import drachenbauer32.angrybirdsmod.entities.models.BluesModel; import drachenbauer32.angrybirdsmod.util.Reference; import net.minecraft.client.renderer.entity.EntityRenderer; import net.minecraft.client.renderer.entity.EntityRendererManager; import net.minecraft.client.renderer.entity.LivingRenderer; import net.minecraft.util.ResourceLocation; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.fml.client.registry.IRenderFactory; @OnlyIn(Dist.CLIENT) public class BluesRenderer extends LivingRenderer<BluesEntity, BluesModel> { private static final ResourceLocation BLUES_TEXTURE = new ResourceLocation(Reference.MOD_ID + ":textures/entity/blues.png"); public BluesRenderer(EntityRendererManager manager) { super(manager, new BluesModel(), 0.25f); } @Override public float prepareScale(BluesEntity entitylivingbaseIn, float partialTicks) { GlStateManager.scalef(0.5F, 0.5F, 0.5F); return super.prepareScale(entitylivingbaseIn, partialTicks); } @Override protected ResourceLocation getEntityTexture(BluesEntity arg0) { return BLUES_TEXTURE; } public static class RenderFactory implements IRenderFactory<BluesEntity> { @Override public EntityRenderer<? super BluesEntity> createRenderFor(EntityRendererManager manager) { return new BluesRenderer(manager); } } } It uses a model and scales it down to half size. But it seams like it is not compatiple to the munition-entities Is there any way to use a model and a scale-factor in a renderer, that´s compatiple with a munition-entity?
  4. i create my own apstact proyectile class for my angry birds munition, and placed it´s name in the customeArrow-method of the slingshot item class. I took the code from the bow item class and modifyed it for my slingshot. But i have got a problem with my abstract munition-class: I took the code from the abstract arrow entity class and made a few modifications to fit it with my own class name. In a method with just a wired bunch of wired numbers i found this. if (entity1 == null) { damagesource = DamageSource.causeArrowDamage(this, this); } else { damagesource = DamageSource.causeArrowDamage(this, entity1); if (entity1 instanceof LivingEntity) { ((LivingEntity)entity1).setLastAttackedEntity(entity); } } It shows errors there. How do i solve this-?
  5. Hello I´m creating a working slingshot, that should use littie Angry Birds as munition for my Angry Birds mod. The slingshot itself acts exactly as a bow now. How do i make only my custom Angry birds-munition compatiple to it?
  6. That means just use my bigger testure on the normal item model base and that´s it?
  7. Hello I want to make some item-models use 32x32 textures instead of 16x16. So i try to find the file "builtin/generated" to make my own modifyed item-model for this texturesize. Where in the minecraft-folders is this file?
  8. i tryed strg and space to show a list of all methods, i can override there and found nothing, that may mean the same. oh, is it now "fill"? it has the same content in it´s brackets. Now i have another problem: void preInit() { List<Item> order = Arrays.asList(AngryBirdsItems.red_egg, AngryBirdsItems.chuck_egg, AngryBirdsItems.blues_egg, AngryBirdsItems.bomb_egg, AngryBirdsItems.mathilda_egg, AngryBirdsItems.terence_egg, AngryBirdsItems.silver_egg, AngryBirdsItems.bubbles_egg, AngryBirdsItems.hal_egg, AngryBirdsItems.stella_egg, AngryBirdsItems.poppy_egg, AngryBirdsItems.willow_egg, AngryBirdsItems.dahlia_egg, AngryBirdsItems.luca_egg, AngryBirdsItems.ice_bird_egg, AngryBirdsItems.balloon_block, AngryBirdsItems.egg_block, AngryBirdsItems.nest_block, AngryBirdsItems.slingshot_block, AngryBirdsItems.slingshot2_block); //tabSorter = Ordering.explicit(order).onResultOf(ItemStack::getItem); } it seams like ItemStack::getItem does not work any more.
  9. Now i have this: package drachenbauer32.angrybirdsmod.util; import drachenbauer32.angrybirdsmod.init.AngryBirdsItems; import net.minecraft.item.ItemGroup; import net.minecraft.item.ItemStack; import net.minecraft.util.NonNullList; public class AngryBirdsItemGroup extends ItemGroup { public AngryBirdsItemGroup() { super("AngryBirds"); } @Override public ItemStack createIcon() { return new ItemStack(AngryBirdsItems.nest_block); } /*public void displayAllRelevantItems(NonNullList<ItemStack> items) { super.displayAllRelevantItems(items); items.sort(tabSorter); }*/ } What is the right thing to replace "displayAllRelevantItems"?
  10. what i need is, how to change the renderer for this instance, because the proportions of this bird change, if he inflates himself. His body expands, but his face and feathers stax the same size. So i have two renderers, wich use different models. If i register both in my render-handler, the seccond one is used for the entity. At first i thaught, maybe it will render both at the same place, doing the same stuff in the same moment. But that isn´t the case. so what must i put in the command-spots of the piece of code in my last post to change the renderer for this instance?
  11. Is this better: @Override public void livingTick() { timeUntilDeflating++; if (timeUntilDeflating >= 80) { //command or deflating here } super.livingTick(); } @Override public void onCollideWithPlayer(PlayerEntity entityIn) { timeUntilDeflating = 0; //command for inflating here }
  12. Hello For testing my entities i created an area with fences around it to keep them together. Than i digged a hole in the ground there and filled it with water as a pool to test, how it looks, if they swim. But now the entities are all together in this pool. It seams like they cannot leave the water them selfs. How do i fix this? Is there any ability (called goals), that i must add to make them able to leave deep wather without any help? Another question about swimming: Is there any way to control, how deep entities sink into the water while swimming?
  13. Hello Somethimae i get this in my console and the test run don´t finish loading: But if i stop this try and try again, it works fine. Why this happens sometimes (once about all 5-10 test runs)?
  14. Why i should not do this timer thing? In my other project (a simple sokoban-game, nothing about minecraft) it works fine. And how do i increase a time-field by tick?
  15. for wich version is your tutorial? I cannot import "CreativeTabs" to extend my own creativetab-class...
  16. Now i have both model-classes with their renderer-classes. How can i switch bitween the renderers, if the entity collides with the player (i think, that´s better than damage, so i can cause him to inflate, withouf damage him)? I found this mothod for the collision. @Override public void onCollideWithPlayer(PlayerEntity entityIn) { super.onCollideWithPlayer(entityIn); } What must i put in there to cause a change to the other renderer? During another project, i found a way to make it first do stuff, than wait a time, than do other stuff: With this i will make him inflate in the moment of the collision and deflate 4 seconds later: @Override public void onCollideWithPlayer(PlayerEntity entityIn) { //command for inflate timer.schedule(new TimerTask() { @Override public void run() { //command for deflate after 4 seconds } } , 4000); super.onCollideWithPlayer(entityIn); } But what must i put above and inside the timer to change the renderer for this instance of the entity?
  17. I have this now, that works for me (in the render-class): @Override public float prepareScale(BluesEntity entitylivingbaseIn, float partialTicks) { GlStateManager.scalef(0.5F, 0.5F, 0.5F); return super.prepareScale(entitylivingbaseIn, partialTicks); } I create my entity models with blockbench and save them as java-classes. Blockbench links the texture resolution directly to the size of the created cube, if i create an entity model. So i must create some of them bigger to give them the right look and shrink them back down with the shown method in their renders.
  18. Hello I registered a bunch of entities with their spawn-eggs. Why the eggs are in the creative-inventory not in the same order like in my registration-list: public static void registerEntitySpawnEggs(final RegistryEvent.Register<Item>event) { event.getRegistry().registerAll(AngryBirdsItems.red_egg = registerEntitySpawnEgg(RED, 0xdf0000, 0xdfbf9f, "red_egg"), AngryBirdsItems.chuck_egg = registerEntitySpawnEgg(CHUCK, 0xffff00, 0xffffff, "chuck_egg"), AngryBirdsItems.blues_egg = registerEntitySpawnEgg(BLUES, 0x007fff, 0xff0000, "blues_egg"), AngryBirdsItems.bomb_egg = registerEntitySpawnEgg(BOMB, 0x3f3f3f, 0x7f7f7f, "bomb_egg"), AngryBirdsItems.mathilda_egg = registerEntitySpawnEgg(MATHILDA, 0xffffff, 0xffbfbf, "mathilda_egg"), AngryBirdsItems.terence_egg = registerEntitySpawnEgg(TERENCE, 0xbf002f, 0xbf9f7f, "terence_egg"), AngryBirdsItems.silver_egg = registerEntitySpawnEgg(SILVER, 0xbfbfbf, 0xffffff, "silver_egg"), AngryBirdsItems.bubbles_egg = registerEntitySpawnEgg(BUBBLES, 0xff7f00, 0x000000, "bubbles_egg"), AngryBirdsItems.hal_egg = registerEntitySpawnEgg(HAL, 0x00bf00, 0xffffff, "hal_egg"), AngryBirdsItems.stella_egg = registerEntitySpawnEgg(STELLA, 0xffadb7, 0xffd7dc, "stella_egg"), AngryBirdsItems.poppy_egg = registerEntitySpawnEgg(POPPY, 0xffff3f, 0xffffbf, "poppy_egg"), AngryBirdsItems.willow_egg = registerEntitySpawnEgg(WILLOW, 0x3f9fff, 0x7fbfff, "willow_egg"), AngryBirdsItems.dahlia_egg = registerEntitySpawnEgg(DAHLIA, 0xbf7f3f, 0xffdfbf, "dahlia_egg"), AngryBirdsItems.luca_egg = registerEntitySpawnEgg(LUCA, 0x7fbfff, 0xffffbf, "luca_egg"), AngryBirdsItems.ice_bird_egg = registerEntitySpawnEgg(ICE_BIRD, 0x7fbfff, 0x007fff, "ice_bird_egg")); } Any idea?
  19. The run-configuration "Run Client" was just deep in a list of other run-configurations of other projects i worked on. So it was out of the rightclick-list of the run-button, that can contain up to 8 ron-configurations. But now i have it back in the list and all is fine now.
  20. Hello I can spawn my entities now in verson 1.14.3. But how can i make one of them smaller (if i try to create the model smaller, it will have not more enough texture-pixels for the face.)? So i want to scale it, while it renders. How does that work in this version?
  21. This is the log about the texture: it tries to load it from the minecraft buildin textures. How do i get it to look into the resources of the mod instead? Ok, now i found out, that i had to set my mod id and a ":" in front of the resource-path to make it look in my resources for the texture. Now my entities finally have their textures.
  22. Hello Now the models of my entities appear in the world. But they have the black and magenta error-texture instead of their own textures, I created for them. Why this happens? in the render of my entity I have this: @Override protected ResourceLocation getEntityTexture(RedEntity arg0) { return new ResourceLocation("textures/entity/red.png"); } That should load the texture for the entity. What must I change here to get it to work (i´m pretty sure, that´s the right resource-path)? This variant also don´t work: private static final ResourceLocation RED_TEXTURE = new ResourceLocation("textures/entity/red.png"); @Override protected ResourceLocation getEntityTexture(RedEntity arg0) { return RED_TEXTURE; }
  23. I use eclipse and I followed every step in the video until the modidication of mods.toml. Than he updated stuff in the java classes. But I don´t have all of this, because I don´t need all stuff from his previous tutorials. So I only updated, what I have, too. If i try to run it as server, it starts with: "2019-07-14 11:51:38,276 main WARN Disabling terminal, you're running in an unsupported environment." and than runs alot of text through the console and terminates without starting a game-window. There are no error-messages in the text. I don´t know, how to put the whoole console-text here. It says, that´s too long. I also tryed to run it, using my RunClient.bat. That runs text through a black dos-like window, but also doesn´t open a MineCraft-game-window. now i can run it with my RunClient.bat.. but there is no matching way to run it directly out of eclipse...
  24. Hello I watched this video: https://www.youtube.com/watch?v=QdPNRv-yT3E&list=PLiDUvCGH5WEUcxyUKxHpQpDuinaiNp3it&index=12 And updated my modding workspace to version 1.14.3 just like he says, how to do it. But now i get no option to run it a client... Can you tell me, what went wrong, and how to fix it? My actual repository: https://github.com/Drachenbauer/AngryBirdsMod
  25. Now i made the Update to 1.14.3 like Harry Talks shows in his newest tutorial video. But i have no options to run it as client now...
×
×
  • Create New...

Important Information

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