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


  • Content Count

  • Joined

  • Last visited

  • Days Won


MSpace-Dev last won the day on November 14 2017

MSpace-Dev had the most liked content!

Community Reputation

13 Good

About MSpace-Dev

  • Rank
    Creeper Killer


  • Gender
  • URL
  • Location
    South Africa

Recent Profile Visitors

2116 profile views
  1. https://github.com/MSpaceDev/CustomChests/tree/1.14.4/src/main/java/com/mspacedev
  2. I have a class called FileManager that manages many things to do with my custom mod files. I'm trying to create a static constant that allows me to reference an array of files whenever I want. However, my program throws an ExceptionInInitializerError. I took a similar test to a basic static void main program, and the program compiled fine. I can't see what I'm doing wrong in my main program below. Here are the relevant files: Log: [11:26:14] [Client thread/ERROR] [ne.mi.fm.ja.FMLModContainer/]: Exception caught during firing event: null Index: 1 Listeners: 0: NO
  3. Ah, thanks. I will look into it further tomorrow morning. I have to head off to sleep, but hope I can get something working. Forge 1.14 is a rather large step in the right direction from what I've seen so far!
  4. How would I achieve something like that roughly? Any suggestions / resources I can look into?
  5. I want to expand my mod's features lots in 1.14.4. I want users to be able to specify mobIDs from other mods in JSON to initialise a new item, block and entity for the specified id. To do this, I need to be able to dynamically create these objects. It would be perfect for my mod. You will be able to see that at a quick glance I think: https://www.curseforge.com/minecraft/mc-mods/monster-totems
  6. So, creating new entity types based on other mods is impossible?
  7. Well, that actually does not run. DeferredWorkQueue#runLater does not get called.
  8. I've been doing some research. What are your thoughts on this method? @SubscribeEvent public static void onRegisterEntities(final RegistryEvent.Register<EntityType<?>> event) { DeferredWorkQueue.runLater(() -> { entityBuilder(event); }); } private static void entityBuilder(final RegistryEvent.Register<EntityType<?>> event) { ArrayList<EntityType<?>> all_entities; all_entities = (ArrayList<EntityType<?>>) event.getRegistry().getValues(); Main.LOGGER.debug("ALL LOADED ENTITIES:"); all_entities.forEach(p -> Main.LOGG
  9. Is it possible to get all loaded entities in the registry (from all other mods) at runtime, to then be able to spawn in said entity within my mod? I feel it might be possible now, with how structured the registry events are in 1.14. I am also trying to generate new entities at runtime based on this by using a builder pattern of sorts.
  10. In FG 2.3, there was a function called replace. It has now been removed / changed in 1.14.4. Here is the function in FG 2.3. /** * Add a source replacement mapping * * @param token The token to replace * @param replacement The value to replace with */ public void replace(Object token, Object replacement) { replacements.put(token.toString(), replacement); } /** * Add a map of source replacement mappings * * @param map A map of tokens -&gt; replacements */ public void replace(Map<Object, Object> map
  11. Ah, I see thanks. Got it working nicely like this @Override public boolean shouldRefresh(World world, BlockPos pos, IBlockState oldState, IBlockState newState) { // Only refresh if new state is not an instance of BlockTotemBase return !(newState.getBlock() instanceof BlockTotemBase); }
  12. I've set TileEntity#shouldRefresh to false so that I can update the blockstate without it resetting its values. However, this makes the tile entity persist when its block is broken. I've added world.removeTileEntity(pos) in theBlock#blockBreak override function. However, the TE still persists. I can verify it is getting called. Am I missing something here? @Override public void breakBlock(World worldIn, BlockPos pos, IBlockState state) { if (!worldIn.isRemote) { if (worldIn.getTileEntity(pos) != null) { if (worldIn.getTileEntity
  13. Ah, alright, got it! Will stick to blockstates then
  14. Yes, I saw it's using 2 entirely different blocks. Is that a recommended way to do it? Would I have to create a new Block class for every block where I want its texture to change at runtime?
  15. I have a custom tile entity that can switch between 2 states, simply with bool = !bool When this switch happens, I would like to change one of the texture references in the model.JSON to switch to another texture. How can I achieve this. (There are multiple textures in the single model) I noticed the furnace DOES NOT use blockstates for this. So, interested in how that was done. If not, I will end up using blockstates. Thanks
  • Create New...

Important Information

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