Jump to content

turbodiesel4598

Members
  • Posts

    66
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • URL
    https://minecraft.curseforge.com/projects/nuclearcraft-mod
  • Location
    Bayston Hill, Shropshire, UK
  • Personal Text
    "Science will beat pseudoscience every time."

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

turbodiesel4598's Achievements

Stone Miner

Stone Miner (3/8)

0

Reputation

  1. Don't worry, found my problem. I was declaring a new block, and then had a configurable registering of the block - I did not realise that the fluid corresponding to the block has it's block type set in the fluid block's constructor. All sorted now
  2. Hi there, The latest update to my mod added 200+ fluids to the game, and a couple of pack-makers are having some trouble due to the number of block IDs these fluids take up. Is it actually possible to add fluids without registering their corresponding blocks? I have tried to do this, but all that seems to happen is that the fluid texture goes missing (perhaps because it's tied to the non-existent block) and some sort of 'substitute' fluid block gets added to the game well after the fluid is registered (I know this much as these blocks appear right at the end of the mod's JEI entries). Thanks in advance
  3. Hi there, I was just wondering - is it possible to use different models and/or textures depending on a variable such as a config option? I can see how this might be done for items, but a problem I see for blocks is that the models are defined in the blockstate json. Thanks in advance
  4. I think you are right about that - it just seems that, by some happy accident, some mods' pipes/cables/conduits are built with the possibility of a machine using two blocks in mind. I'm almost certain at this point that these issues would disappear if I changed that up. Thank you all for the help
  5. The only reason is probably because the tutorials that I originally watched when first learning how to mod set up their 'custom furnaces' or whatever in that way. When I updated to 1.10.2 and above I guess I didn't know enough about what block states were to realise how I could just use one block. Perhaps I will do that some day, if you recommend doing so. Anyway, this doesn't fix the problem either. After a bit more testing, I noticed something a little peculiar. If the machine is off, and then is switched on by, say, adding an item to the input slot, the machine turns on and runs correctly - the energy buffer is kept full and the output is removed as expected. If the machine is then turned off, the output is no longer taken out, and if turned back on again, energy is no longer accepted either. Also, if an adjacent duct undergoes an update (for example, using the crescent hammer on an adjacent duct), then the input/output through that duct alone starts to work again.
  6. I did not know changing the block removes the tile entity. Unfortunately your suggestion does not fix the issue, and I imagine that would be because the idle and inactive blocks are indeed different blocks. I realise now that I should have been more clear - the machine doesn't have its block's state change - the block type changes, e.g. blockMachineIdle -> blockMachineActive. In fact, setting the method to return flat out true or false doesn't solve the issue in either case, so I don't think the issue is there.
  7. Hi there, I have a simple issue which is that my machines stop being able to accept items/fluids/energy (or indeed have them taken out) after the block undergoes an update. I should note that for whatever reason, this issue only appears with certain conduits/ducts such as those of Thermal Dynamics and Integrated Tunnels, but since other machines from other mods don't appear to have the issue, I think the error must be on my end. The machines will undergo a block update whenever the machine turns on or off, and this happens if it can run or can't run. All of my machines effectively follow the same recipe, so the solution for one of them should almost certainly be the same for the others, but for the purpose of showing the source code, I'll pick one of them: Tile Entity class (and superclasses if required): Processors.java TileEnergyItemProcessor.java TileEnergySidedInventory.java TileEnergyInventory.java TileEnergy.java NCTile.java Block class (and superclasses if required): BlockManufactory.java BlockProcessor.java BlockSidedInventoryGui.java BlockSidedInventory.java BlockInventory.java Thanks in advance
  8. Does your server run without any mods installed? If so, it is either a client-side only mod or mod conflict causing the issue, but I think the former is most likely. For example, I'm not sure Damage Indicators can run server-side.
  9. This technically isn't modder support by the way, but it looks like one of the mods you are trying to run on the server is client-side only, hence is missing client-only classes that the mod is importing somewhere.
  10. Awesome - thanks. I have about 150 to add so that's nice to know
  11. Hit there - just a quick question. Is there a limit to the number of fluids that can be registered, and if so, what is that limit? Thanks in advance
  12. Did not know that, but I guess that's good practise if you want to minimise conflits, right? Probably a good idea then. Yeh, it's not great, but the reason it's there is because I just copied it over from my base item class so that I could use the same naming system for the discs (because obviously I can't extent my base class in this case). I'll clean it up at some point. Are you saying it will crash when the language is changed? Because I haven't had any reports of it just crashing servers yet. Yeh, I need to - I know it's bad pracice, and I just keep forgetting. I'll get rid of it. No errors show up when I insert the disc. Essentialy, nothing happens. The disc goes in and... silence. I tried using other sound files I know play correctly, and they didn't play either, and I also temporarily swapped out the standard furnace sound effect for the record music, and it did play, so I'm pretty sure that the issue is specifically with the music disc item, but I just don't know where the issue is - I even looked up other mods' classes (Botania and BoP), and they do nothing discernibly different, yet theirs seem to behave. EDIT: Found the issue - I was registering my sounds after my items. The problem has now gone - thanks for the help.
  13. Hi there, I'm trying to add a couple of music discs to the game - the general idea is to just extend the ItemRecord class and register instances. My discs are in the game, and can be inserted into jukeboxes, but their associated music does not play. Another hint that there is something wrong is that the name of the song does not appear above the hotbar as one would usually expect. Other sounds in the mod do work, by the way. I have probably just misinterpreted and misused some of the methods - here are the relevant classes and files: NCItemRecord: public class NCItemRecord extends ItemRecord { public final String[] info; private final String music; private final String name; public NCItemRecord(String unlocalizedName, String registryName, SoundEvent sound, Object... tooltip) { super("record_" + unlocalizedName, sound); name = unlocalizedName; setUnlocalizedName("record_" + unlocalizedName); setRegistryName(new ResourceLocation(Global.MOD_ID, "record_" + registryName)); music = Global.MOD_ID + ":music." + unlocalizedName; if (tooltip.length == 0) { String[] strings = {}; info = strings; } else if (tooltip[0] instanceof String) { String[] strings = new String[tooltip.length]; for (int i = 0; i < tooltip.length; i++) { strings[i] = (String) tooltip[i]; } info = strings; } else if (tooltip[0] instanceof Integer) { String[] strings = new String[(int) tooltip[0]]; for (int i = 0; i < (int) tooltip[0]; i++) { strings[i] = I18n.translateToLocalFormatted("item." + "record_" + unlocalizedName + ".des" + i); } info = strings; } else { String[] strings = {}; info = strings; } } public void addInformation(ItemStack itemStack, EntityPlayer player, List<String> tooltip, boolean advanced) { //super.addInformation(itemStack, player, tooltip, advanced); if (info.length > 0) NCInfo.infoFull(tooltip, info); } public ResourceLocation getRecordResource(String name) { return new ResourceLocation(Global.MOD_ID, "music." + name); } public EnumRarity getRarity(ItemStack stack) { return EnumRarity.EPIC; } @SideOnly(Side.CLIENT) public String getRecordNameLocal() { return I18n.translateToLocal("item.record_" + name + ".des0"); } } Relevent part of registering: public static Item record_wanderer; public static Item record_end_of_the_world; . . . record_wanderer = new NCItemRecord("wanderer", "wanderer", SoundHandler.WANDERER, 2); record_end_of_the_world = new NCItemRecord("end_of_the_world", "end_of_the_world", SoundHandler.END_OF_THE_WORLD, 2); . . . registerItem(record_wanderer, CommonProxy.TAB_MISC); registerItem(record_end_of_the_world, CommonProxy.TAB_MISC); . . . registerRender(record_wanderer); registerRender(record_end_of_the_world); SoundHandler: public class SoundHandler { private static int size = 0; public static SoundEvent FUSION_RUN; public static final int FUSION_RUN_TIME = 67; public static SoundEvent ACCELERATOR_RUN; public static final int ACCELERATOR_RUN_TIME = 67; public static SoundEvent WANDERER; public static SoundEvent END_OF_THE_WORLD; public static void init() { size = SoundEvent.REGISTRY.getKeys().size(); FUSION_RUN = register("block.fusion_run"); ACCELERATOR_RUN = register("block.accelerator_run"); WANDERER = register("music.wanderer"); END_OF_THE_WORLD = register("music.end_of_the_world"); } public static SoundEvent register(String name) { ResourceLocation location = new ResourceLocation(Global.MOD_ID, name); SoundEvent event = new SoundEvent(location); SoundEvent.REGISTRY.register(size, location, event); size++; NCUtil.getLogger().info("Registered sound " + name); return event; } } sounds.json: { "block.fusion_run": { "category": "block", "subtitle": "block.fusion_run", "sounds": [ { "name": "nuclearcraft:block/fusion_run", "stream": false } ] }, "block.accelerator_run": { "category": "block", "subtitle": "block.accelerator_run", "sounds": [ { "name": "nuclearcraft:block/accelerator_run", "stream": false } ] }, "music.wanderer": { "category": "record", "subtitle": "music.wanderer", "sounds": [ { "name": "nuclearcraft:music/wanderer", "stream": true } ] }, "music.end_of_the_world": { "category": "record", "subtitle": "music.end_of_the_world", "sounds": [ { "name": "nuclearcraft:music/end_of_the_world", "stream": true } ] } } Thanks in advance
  14. Hey there, I am developing a mod, and have IC2 installed for when I run the client in eclipse. For some reason that I have not been able to deduce, every time I enter a world that has one of my tile entities - TileFluidGenerator - in it with the 'hasConsumed' boolean equalling false, the game crashes and the 'hasConsumed' is set to true. When the world is next loaded (and 'hasConsumed' is true), there is no crash. This does not happen with my other related TEs such as TileItemGenerator, which is effectively exactly the same, but manipulates items rather than fluids. The crash report is here: https://pastebin.com/JRs3StB7 Does anyone know what is happening? Thanks in advance.
  15. Right, know what I'm doing a lot better now. Obviously just need to sort out the model errors and then I'll be good. Thanks so much for the help
×
×
  • Create New...

Important Information

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