Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/29/20 in all areas

  1. You can also find them in the client-extra jar in your IDE’s libraries.
    1 point
  2. Bingo! After looking through the generic minecraft json format (on the game wiki) I found this worked! I believe the issue was something like there was no property named "normal" (or whatever else) in my code for the block? Which would seem logical that it wouldn't work, I guess... So by just not calling it anything (as the mc wiki says you should for only one state) it works! Onwards and upwards to even more variants! Thanks!
    1 point
  3. Is that installer jar in your mods folder? If it is, remove it. Also always post new logs when you get a new error
    1 point
  4. In the logs folder in your .minecraft game folder (or another folder if you changed it in the Installation settings)
    1 point
  5. Yes. https://github.com/MinecraftForge/MinecraftForge/pull/6464/commits/c8c5de901da70bedb084570d170d46a2c9a1a84d https://cadiboo.github.io/tutorials/1.15.1/forge/3.3-config/
    1 point
  6. Hi I'd like to know if you guys have any good course / book to know how OpenGL works for Minecraft
    1 point
  7. Minecrafts got like everything abstracted away in multiple ways. Looking at vanilla’s code is the best way to understand stuff. The basics of rendering are - get the render buffer you want - add data to that buffer Your data then gets drawn by minecraft AT A LATER DATE. So you cannot interact with open GL directly as by the time your data is rendered, the open GL state will have been changed by other stuff. You render data to a render type buffer by adding vertices to the buffer. You do this by calling methods on the buffer like “pos”, “color”, “tex” and then finish it off for each vertex with “endVertex()”. These methods are chainable so you can do “buffer.pos(x, y, z).color(r, g, b, a).tex(u, v).endVertex();”
    1 point
  8. EntityTypes get created after Items. You’re trying to use an EntityEntry from your item when you make a spawn egg. This can’t work. As I said, the situation is problematic. That’s why I said you should make your own spawn egg that accepts a Supplier<EntityType> instead of an actual EntityType.
    1 point
  9. Assuming https://github.com/DragonGamerDevelopers/NewFantasyMod-1.15.1/blob/master/src/main/java/mod/dragonita/fantasymod/init/ModItems.java is your up to date code producing that error, then it's wrong. You're registering your entity type directly in the (vanilla) minecraft Registry in a class constructor which is called before any registration is happening. That's always going to fail, and you should never be touching the vanilla registry directly. Entity types work with DeferredRegister just like any other Forge registry entry. As an example, see PneumaticCraft entity registration here, which works fine: https://github.com/TeamPneumatic/pnc-repressurized/blob/1.14/src/main/java/me/desht/pneumaticcraft/common/core/ModEntities.java
    1 point
  10. public final class ModItems { // 1: This shouldn't be in a class called ModItems // 2: You shouldn't be using this method, thats why its depreciated, you should be using the registry events @SuppressWarnings("deprecation") private static <T extends Entity> EntityType<T> register(String key, EntityType.Builder<T> builder) { return Registry.register(Registry.ENTITY_TYPE, key, builder.build(key)); } public static final DeferredRegister<Item> ITEMS = new DeferredRegister<>(ForgeRegistries.ITEMS, Main.MODID); // This shouldn't be in a class called ModItems //public static final DeferredRegister<EntityType<?>> ENTITY_TYPES = new DeferredRegister<>(ForgeRegistries.ENTITIES, Main.MODID); // 1: This shouldn't be in a class called ModItems // 2: You shouldn't use static initialisers // 3: You shouldn't register stuff statically // You should create and register your objects inside the registry events public static final EntityType<UnicornEntity> UNICORN = register("unicorn_entity", EntityType.Builder.create(UnicornEntity::new, EntityClassification.AMBIENT).size(0.5F, 0.9F)); // This is correct - it's how you should be doing your registration, but it shouldn't be in a class called ModItems //public static final RegistryObject<EntityType<UnicornEntity>> UNICORN = ENTITY_TYPES.register("unicorn_entity", () -> EntityType.Builder.create(UnicornEntity::new, EntityClassification.AMBIENT).build(null)); public static final RegistryObject<Item> RAINBOW_INGOT = ITEMS.register("rainbow_ingot",() -> new Item(new Item.Properties().group(ModItemGroups.RAINBOW_MOD_GROUP))); public static final RegistryObject<Item> UNICORN_ENTITY_EGG = ITEMS.register("unicorn_entity_egg", () -> new SpawnEggItem(UNICORN, 0xf0f0f0, 0xdf51f5, new Item.Properties().group(ModItemGroups.RAINBOW_MOD_GROUP))); } You should remove entity related stuff from your ModItems class and make a new class like so: public final class ModEntityTypes { public static final DeferredRegister<EntityType<?>> ENTITY_TYPES = new DeferredRegister<>(ForgeRegistries.ENTITIES, Main.MODID); public static final RegistryObject<EntityType<UnicornEntity>> UNICORN = ENTITY_TYPES.register("unicorn", () -> EntityType.Builder.create(UnicornEntity::new, EntityClassification.AMBIENT).size(0.5F, 0.9F).build(null)); } and register your DeferredRegister in your mods constructor like this.
    1 point
  11. Looking at SaplingBlock from Minecraft, it extends BushBlock what has a function: protected boolean isValidGround(BlockState state, IBlockReader worldIn, BlockPos pos) { Block block = state.getBlock(); return block == Blocks.GRASS_BLOCK || block == Blocks.DIRT || block == Blocks.COARSE_DIRT || block == Blocks.PODZOL || block == Blocks.FARMLAND; } would suggest, override this method...
    1 point
  12. It’s definitely possible to change the player model’s pose. I would look at vanilla’s code and see where it’s done from, poke around a bit and see if there are any events you can use or if there is anything that you can replace to get what you want.
    1 point
  13. 0 points
×
×
  • Create New...

Important Information

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