
DestinySpork
Members-
Posts
66 -
Joined
-
Last visited
Everything posted by DestinySpork
-
[Solved] [1.8.9] Rendering TileEntity
DestinySpork replied to abused_master's topic in Modder Support
setting to -1 works as well I believe (which is the default) -
[1.8/1.9] Custom textures with stairs?
DestinySpork replied to thenewpotato's topic in Modder Support
That is because it's stored in the parent class. Change the parent to your own model with the right textures. Acacia stairs: Stairs.json: -
MC1.7.10 generating layers of custom stones
DestinySpork replied to winnetrie's topic in Modder Support
Look in the ore generator class, and the maths involved, and find where it sets Y values and kinda squish it (say y/3). You can then call your code in PopulateChunkEvent#post on the event bus. I don't know efficient this would be though, and there is probably a better way -
Ok, I've decided to just say what it is I'm trying to make, and so hopefully somebody can help me from there. I want to make a multiblock structure for an oil jack, and I want the 'swingy bit' to swing when it is active. I'm thinking of using 2 models, one for the frame and one for the arm. Hopefully this makes it clear what I am trying to achieve here. PS. I don't want to use JSON because a. I want smooth motion and b. It's horrible and blocky, and can only do rectangular quads. Edit: I was kinda wrong about that, smooth motion is possible with interpolation.
-
Ok, so I've gone through all the code and copied it out. However, my block just renders as a cube with missing texture. It is doing something because it is outputting to the console: Also, i'm not sure why there is a chest involved with this, because it's looking for engine models. Anyway, a model is better than no model so can anyone see what is wrong here? EntityChest - http://pastebin.com/gWzNFJib TileEntityChest - http://pastebin.com/PAYmWeJL ClientProxy - http://pastebin.com/ScY4XpAN If you need other classes tell me. Also also - it looks to me like these 'frames' are stored inside a jason file - is there no way to set them in code? I don't want the model to change, I just want it to move, and smoothly (using sin(x) ).
-
Ok, the code is kinda hard to follow but thanks anyway
-
If rendering tasks could be migrated to the GPU it would be a very good thing (the game is still cpu rendered?), or just hardware utilization in general. On large modpacks, my framerate can go down to like 13, but my cpu and gpu will only be running at ~50%. If this could be optimized it would be great. If the game is CPU rendered, could we at least have TESRs run on the gpu? This should make mods a lot less laggy
-
This is just a simple suggestion: An extension of the Block class, but can have say 64 or 128 metadata values. I'm suggesting a separate class because otherwise world saves would be a lot bigger.
-
If it's not possible with TESR or just the tile entity, how could this be achieved?
-
(This post was renamed) I have a working 3d model using a .obj file, but I would like to know if I can render it from a tile entity. I want to know because I want to a. animate it and b. change it depending on the block's state. Also if anyone knows how to make my custom furnace render correctly in the inventory that would be appreciated http://prntscr.com/an17a9
-
[Solved] WorldSavedData readFromNBT not called
DestinySpork replied to DestinySpork's topic in Modder Support
Well I rewrote my whole world saved data class using Diesieben's example and it works now. For anyone else having issues: https://github.com/Questology/Questology/blob/master/src/main/java/demonmodders/questology/QuestologyWorldData.java -
[SOLVED] Cannot install forge workspace after windows restore.
DestinySpork replied to Elix_x's topic in Modder Support
Ok it's probably not the issue, but did you reinstall Java and the relevant JDK? -
Maybe this page will help you, I assume you are talking about the Speech Recognition: http://cmusphinx.sourceforge.net/wiki/tutorialsphinx4 The API link doesn't work though so you may have to copy bits of code that you need.
-
Have you imported EnumHelper? CTRL + Shift + O in eclipse, or hover over it and hit import.
-
[Solved] WorldSavedData readFromNBT not called
DestinySpork replied to DestinySpork's topic in Modder Support
It's called in OreSaves#getSave. -
public static final Item.ToolMaterial yourMaterial = EnumHelper.addToolMaterial("name", harvestlevel, maxUses, efficiency, damage, enchantability);
-
[1.8.9][Solved] Item textures for block with meta data
DestinySpork replied to korti11's topic in Modder Support
This is because you need to specify models for the block item as well. You should make a file models/item_block_name.json which points to the main block model, like this: { "parent":"modid:block/copper_ore", "display": { "thirdperson": { "rotation": [ 10, -45, 170 ], "translation": [ 0, 1.5, -2.75 ], "scale": [ 0.375, 0.375, 0.375 ] } } } -
I just set up a 1.9 workspace with no issues. If you need it, here's how: (Assuming you're on Windows) download 1.9 Forge MDK Extract it somewhere Copy all contents into your work directory Shift + right click in the directory and select "open command window here" Type gradlew build, and wait for it to finish If you are using Eclipse, run gradlew eclipse. Then Open eclipse, and set your directory to workdir/eclipse And that should work.
-
I am making a mod in which I want to have oil, but I don't want to have actual oil liquids generating in the world. What I want to do is use WorldSavedData to store chunk coords of the chunks which contain oil. It works fine, apart from the fact that readFromNBT is never called, and so my data is not present after a world relog or a game restart. All of my code is here: https://github.com/DestinySpork/AppliedAutomation But here is my WorldSavedData class to make it easier: public class OreSaves extends WorldSavedData{ private int[] oil2; public List<Integer> oil = new ArrayList<Integer>(); public List<Integer> newOil = new ArrayList<Integer>(); public OreSaves() { super(key); } public boolean isOilChunk(Chunk chunk){ if(oil.contains(chunk.xPosition)){ return true; } return false; } public final static String key = "appliedscience.oregens"; /** * this was in the tutorial, not sure what it's needed for public static OreSaves forworld(World world){ MapStorage storage = world.getPerWorldStorage(); OreSaves result = (OreSaves)storage.loadData(OreSaves.class, key); if(result == null){ result = new OreSaves(); storage.setData(key, result); } return new OreSaves(); } **/ public static OreSaves getSave(World world){ MapStorage storage = world.getPerWorldStorage(); OreSaves instance = (OreSaves) storage.loadData(OreSaves.class, key); if(instance == null){ instance = new OreSaves(); storage.setData(key, instance); } return instance; } public void generateOil(int chunkX, int chunkZ){ System.out.println("Oil was generated"); System.out.println("Added " + chunkX + " , " + chunkZ); newOil.addAll(oil); newOil.add(chunkX); newOil.add(chunkZ); oil = newOil; this.markDirty(); } /** * <i> Requires </i> Java 8 or higher */ @Override public void readFromNBT(NBTTagCompound nbt) { System.out.println("Read from NBT!"); int[] t = nbt.getIntArray("Oil"); oil = IntStream.of(t).boxed().collect(Collectors.toList()); } /** * <i> Requires </i> Java 8 or higher */ @Override public void writeToNBT(NBTTagCompound nbt) { System.err.println("Writing NBT"); int[] t = oil.stream().mapToInt(e -> e).toArray(); nbt.setIntArray("Oil", t); } } I call it from a command: @Override public void execute(ICommandSender sender, String[] args) throws CommandException { boolean isOil = OreSaves.getSave(sender.getEntityWorld()).isOilChunk(sender.getEntityWorld().getChunkFromBlockCoords(sender.getPosition())); if(isOil) sender.addChatMessage(new ChatComponentText("The current chunk contains "+EnumChatFormatting.DARK_GRAY+"Oil.")); else sender.addChatMessage(new ChatComponentText("The current chunk contains no oil.")); return; }
-
[Unsolved] B3D Block rendering in 1.8
DestinySpork replied to DestinySpork's topic in Modder Support
You mean like this in the blockstates file? Because this doesn't work: { "variants": { "normal": { "model": "appliedautomation:ModelTest.b3d" } } } If there is a decent tutorial on this for 1.8 that would be great. -
[Unsolved] B3D Block rendering in 1.8
DestinySpork replied to DestinySpork's topic in Modder Support
Ok well that works... but it only works with json files, and I want it to use B3D files (Or even better, Obj files) -
I'm working on a 1.8 mod and I want to use B3D models because the JSON models can't do triangles. I have used the code from here: https://github.com/MinecraftForge/MinecraftForge/blob/b45fd787f36626ef84f26e881848167fec5957b5/src/test/java/net/minecraftforge/debug/ModelLoaderRegistryDebug.java But when I start the game it tells me there are no models defined [16:02:38] [Client thread/ERROR] [FML]: Model definition for location appliedautomation:block_analyzer#facing=up not found [16:02:38] [Client thread/ERROR] [FML]: Model definition for location appliedautomation:block_analyzer#facing=down not ..and so on for every side I have a b3d file in appliedautomation and appliedautomation#model#block but neither seem to work. Is this a thing with my code or with my model file? (which is saved as block_analyzer.b3d ) ClientProxy: http://pastebin.com/YcHPLF51 BlockAnalyzer: http://pastebin.com/3g0W0zQC The model file is this, converted into b3d through Blender. Yes, it is a model from EnderIO, I will not be using this model in the mod, it's just to test with. http://pastebin.com/b3xNug0h It is just a bunch of numbers - it's an Obj file. Thanks for any help
-
So I have a block with a meta-dependent texture, but when it's held it shows the wrong faces http://prntscr.com/a8qlxy How can I rotate it to show the face of the machine? here's my rendering method: @SideOnly(Side.CLIENT) @Override public void registerBlockIcons(IIconRegister reg) { this.icons[0] = reg.registerIcon("sporksstuff:generator_bottom"); //bottom this.icons[1] = reg.registerIcon("sporksstuff:generator_top"); //top this.icons[2] = reg.registerIcon("sporksstuff:generator_front"); //north this.icons[3] = reg.registerIcon("sporksstuff:generator_side"); //it literally says in the name. Why am I writing this? this.icons[4] = reg.registerIcon("sporksstuff:generator_front_active"); } @Override public IIcon getIcon(int side, int meta) { if(side == meta) {return icons[2]; } if(side == meta-6) return icons[4]; if(side == 0 || side == 1) return icons[side]; //top & bottom return icons[3]; } Thanks
-
It looks like it may be working, but I will finish off the code and see if it actually is, or if I did something wrong and it's still displaying clientside data. Whichever way, thank you
-
nvm this