Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/10/17 in all areas

  1. Hi everyone, I want to identify where water and I have a BlockPos, but it doesn't work: @SubscribeEvent public static void livingDropsEvent(ItemTossEvent e) { Utils.getLogger("FMHammers").info("1"); if (e.getEntityItem().getEntityItem().getItem() == ModItems.moltenDuctTape) { Utils.getLogger("FMHammers").info("2"); World world = e.getEntity().getEntityWorld(); Block srcBlock = world.getBlockState(e.getEntity().getPosition()).getBlock(); BlockPos pos = e.getEntity().getPosition(); EntityItem item = new EntityItem(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(ModItems.ductTape)); if (srcBlock.equals(Blocks.WATER)) { Utils.getLogger("FMHammers").info("3"); e.getEntity().setDead(); world.spawnEntity(item); world.playSound(pos.getX() + 0.5D, pos.getY() + 1.0D, pos.getZ() + 0.5D, SoundEvents.BLOCK_FIRE_AMBIENT, SoundCategory.AMBIENT, 1.0f, 1.0f, true); world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, pos.getX() + 0.5D, pos.getY() + 1.0D, pos.getZ() + 0.5D, 0.0D, 0.0D, 0.0D, new int[0]); } } } HELP ME PLS
    1 point
  2. Don't use Reference use ModBlocks. Your reference contains a enum, not a Block which is what is causing this error. I suggest you learn Java before you try to make a mod, seeing as how Java can be quite complicated if you have never programmed before.
    1 point
  3. But if I logging current block in console, that shows me Minecraft:air
    1 point
  4. Hi everyone, I want to play default minecraft sound: world.playSound(pos.getX() + 0.5D, pos.getY() + 1.0D, pos.getZ() + 0.5D, "liquid.splash", SoundCategory.AMBIENT, 1.0f, 1.0f, true); But it doesn't work. I don't know how to play it HELP ME PLS
    1 point
  5. So, 'cause I have only to blockpos, how to get nearest player?
    1 point
  6. You shouldn't avoid JSON models. Avoiding them will be harder than making a few model files.
    1 point
  7. gen_AngelicOre = new WorldGenMinable(eAngelusBlocks.angelicOre.getDefaultState(), 2, BlockMatcher.forBlock(Blocks.STONE)); eAngelusBlocks.angelicOre This is null. And it is null because you are initializing your blocks/items in your client proxy(aka client side only). Edit - well, I'm late. Anyway you should not use proxies for common code, just move it somewhere else, pereferrably to the new registry events.
    1 point
  8. The name of the registry should be something like <modid>:cards, not <modid>:textures/cards. It's a unique name for the registry, not a texture path. The default key of the registry is the registry name of the default value. This is optional, the Block registry uses minecraft:air (the registry name of Blocks.AIR) and the PotionType registry uses minecraft:empty (the registry name of PotionTypes.EMPTY); but the other vanilla registries don't specify a default key. You need to implement IForgeRegistryEntry on Card, the super type of the registry. Do this by extending IForgeRegistryEntry.Impl. Delete the CardRegistry class. You should create a class like ForgeRegistries to store the IForgeRegistry<Card> instance (the Card registry), using GameRegistry.findRegistry to initialise the field. Make sure you only reference this class after RegistryEvent.NewRegistry is fired (e.g. in your RegistryEvent.Register<Card> handler). You need to register your Card instances in RegistryEvent.Register<Card>.
    1 point
  9. It looks like the RenderManager instance was null when you created the RenderChimera instance, probably because you did this too early. RenderingRegistry.registerEntityRenderingHandler(Class<? extends Entity>, Render<? extends Entity>) is deprecated, use RenderingRegistry.registerEntityRenderingHandler(Class<T>, IRenderFactory<? super T>) in preInit instead. The IRenderFactory#createRenderFor method will be called with the RenderManager instance and needs to create and return your Render instance. You can use a lambda or constructor method reference to implement IRenderFactory. RenderLiving is a generic type, you need to specify the type argument. Always annotate override methods with @Override so you get a compilation error if they don't actually override a super method. You should use your IDE to auto-generate override methods with the correct signature and annotation. You're creating a ResourceLocation with minecraft as the domain and your mod ID and texture path as the path, which is incorrect. Either use the ResourceLocation(String, String) constructor or separate the domain and path with a colon.
    1 point
  10. I've showed you how to get the player's position, get a chunk from a position, get the tile entity map from a chunk, and get the size of a map. That should be everything you need. Try out the code you think will work, and if it doesn't work, show us the code you've tried and we'll help you further from there.
    1 point
  11. Perhaps these methods will point you in the right direction: World#getChunkFromBlockCoords(BlockPos pos) = Returns the chunk at the given position. Chunk#getTileEntityMap() = Returns a map of BlockPos to TileEntity; that is, it returns a Map<BlockPos, TileEntity> containing all the loaded tile entities in that chunk.
    1 point
  12. "co.coolbeyblades7.minecraft_mod.proxy.ClientProxy;" Remove the semicolon. https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/ores/OresBase.java#L90 public void postInit(FMLPreInitializationEvent event) Double check the event object you have here. I'll give you one hint:
    1 point
  13. Your register items isn't static. also this will crash on a dedicated server as ModelRegistryEvent is only on the client
    1 point
  14. You shouldn't be using IDs or metadata directly. That gives you an IBakedModel object which is a series of quads. I believe that the texture will be bound for you when you go to render it.
    1 point
  15. Hi everyone, I have one problem, if I use my drill, it digging in both side. For example: My drill digging area 3x3x3 and it digging 3 blocks forward and backward, but I want only forward (where looking player). Code of digging is here: https://github.com/IvanSteklow/FMHammers/blob/master/src/main/java/ivansteklow/fmhammers/tools/ItemDrill.java#L80 PLS HELP, and excuse me for broken english))
    1 point
  16. I think you don't understand me, it digging 9 blocks forward and backward. Video test:
    1 point
  17. You are rendering your model at 0,0,0 view-space wise. You need to translate the matrix accordingly by the x/y/z passed in the doRender method. You also probably want to bind your texture before rendering the model.
    1 point
  18. It is not intended to allow you to remove recipes during the Register event. It is intended to be json driven. It just hasn't been implemented yet. But yes, the Register<IRecipe> event will eventually be fired multiple times, as it sits the current state is not determined and you should only REGISTER your shit in that event not remove others.
    1 point
  19. Forge Version: 1.12-14.21.1.2387 Minecraft Version: 1.12 Downloads: Changelog (Direct) Windows Installer (AdLink) (Direct) Other Installer (AdLink) (Direct) MDK (AdLink) (Direct) Universal (AdLink) (Direct) Minecraft 1.12 has been released! And we have finally gotten the big breaking changes in and Forge should be in a fairly stable state! 1.12 has brought a lot of changes, most notably the new Json based recipe system. This was a major hurdle to get over as we had to expand this system to support modded recipes. And to support the many different ways modders interact with crafting. We also had to re-write a large section of internal Forge code due to how Mojang implemented the new crafting guide book. Mojang also is now forcing Java 8 in the vanilla client. Which broke quite a few things related to how we decompile Minecraft itself. Which required me to re-write large portions of the decompiler we use. Overall there was a lot of things changed and due to this there are no doubt still issues in these systems. However I am wanting to push out this release so that we can switch the official development to 1.12 versions. This is also a signal to modders who have already adopted 1.12 {There are a lot of you, this is very encouraging!} that we have stabilized our API. Which means no more intentionally breaking everyone's mods <3 So I hope you guys will stick with us, and I apologize for the delay in getting this first build out. The Recipe System: 1.12 introduced a new JSON based recipe system. Like all systems Forge has had to expand this to support the things that modders want to do. To that extent if you are a modder please read this gist. That is my initial comments and design ideas for the JSON based system. My intention is that someone from the community who is better at writing documentation then I am will come along and convert that to proper docs in our documentation repo. *Hint Hint* Registry Rewrite: One of the core feature of Forge has been the Block/Item registry system. This is what has allowed us to internally manage the ids, world saves, all that stuff. This system has expanded from it's original implementation of just Blocks/Items to a lot of things. Biomes, Entities, Potions, Enchantments, and now Recipes. This is the system that has allowed users and mod pack creators to not need to care about ID conflicts anymore. With recipes being added to this system it has required a MAJOR rewrite of how it works. However this re-write is for the better as it fleshes out and fixes some features that were not fully supported in the older version. There are however things people need to know. Users: Due to the re-write being a great time to delete old complicated, sadly we have had to remove support for updating <1.10 worlds. It is recommended that you load the world using 1.11.2 Forge so it can do the legacy upgrade and THEN load it with 1.12. And as always with anything related to updating worlds between Minecraft versions, we recommend that you make backups of your world before hand! Modders: It is now recommended and HIGHLY encouraged that you use the RegistryEvent.Register<T> functions when creating your block, items, potions, recipes, etc... These events have changed to being fired after pre-init. If you use these events you will better suited for the future when we introduce reloading mods dynamically at runtime. Basically.. use these events! Modders: Substitutions and @ObjectHolders have got a major enhancement, things should be a lot simpler to use now! Minecraft Forge 14.21.1 Changelog: ============================================================================ New: MAJOR rewrite of the Registry system Dropped world loading support for <1.10 worlds. Load them in 1.11.2 before updating to 1.12. New JSON recipe loading system enhancements. Added support to vanilla JSONS to specify NBT data in output. MissingMappingEvent is now fired for ALL registries @ObjectHolders and overriding should now be supported on ALL registries. Added AnimalTameEvent for Parrots. Forced Block/Item.getSubItems method to be available on the server side. Bug Fix: Fixed crash related to player names Fix NPE in config menu with custom keybinds. Fixed exception in ShapedOreRecipe.checkMatch for recipes that don't fill entire crafting grid Fixed bug SPacketLoginSuccess when in development environments. Fixed exception related to vanilla clients connecting to a Forge server. Fixed NoteBlockEvent not supporting new vanilla instruments. Fixed Universal bucket handling for Fluids with NBT Just wanted to reiterate this again, BACKUP your worlds! And to properly report any issues you run into. This means including your fml log!
    1 point
×
×
  • Create New...

Important Information

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