Everything posted by Draco18s
-
1.8 CreativeTabs crash
It might have something to do with getBlockState....
-
New Furnaces, improving how furnaces are added
If you (generic) are creating a furnace that "just looks different" you would just have all the Blocks create the same TileEntity. There's no reason to create a new TE class (even one that extends some generic version) just because it belongs to a different block. As for "allowing mods (and MC itself) just to know this thing is a furnace": what value is there in that? Why "furnace" instead of "grinder" "machine" "oven" "a thing that has an inventory and updates every tick and alters that inventory" or some other niche distinction? Why is "furnace" the important distinction to make?
-
crashlog..not sure what it means
Ok, I'll grant that that is a valid point.
-
New Furnaces, improving how furnaces are added
Really though, there doesn't need to be a common furnace. It's a TileEntity (common code) that implements ISidedInventory (probably) or at least IInventory. Which is all that's needed for every mod ever to be able to insert items or extract them (including using the vanilla Hopper). No other mod needs to care about how your CustomFurnace actually smelts inputs into outputs, so having a "common core" for the updateTick method is pointless. Per liquids, I suspect it was originally because creating a new liquid was Hard* and so it was written as a base class that mods could extend in order to easily get a liquid working "like vanilla" and morphed later into the liquid registry (et cetera) due to the number of mods wanting to move liquids around and treat them in common ways without having to do a bunch of special casing. There is IFluidBlock, which is implemented by BlockFluidBase, but it doesn't really supply all of the necessary details, as BlockFluidBase is the class that handles the Fluid object. But sure, feel free to create that library if you want to. Dollars to doughnuts no one will use it. *My first attempt at a liquid, using the Forge liquid base block didn't even work correctly, just to give you an idea of how Hard it actually is!
-
[1.7.10] What event is called when a new chunk is created
Also keep in mind that there are other mods out there that modify a chunk long after its been generated. COG, for example, waits until the next chunk over is modified so that it can go in and clean up any coal that bleeds over before placing ores using its own algorithms ("deferred generation +16"; "deferred +32" would be two-chunks-over, etc. although nothing uses anything later than that by default). So yeah, depending on what you're doing, the right place to sit and wait for an event might change.
-
[1.7.10]How to use Vec3
Exactly what it says on the tin. Funny how classes are named what they are.
-
[1.7.10] How to convert the code, which works in 1.8 to 1.7.10
Reflection is an entire Java package dealing with class files. It's half way between "code that runs" and "code that modifies running code" (ASM). Here's a chunk I use: try { Class clz = BiomeGenBase.class; WildlifeEventHandler.rains = clz.getDeclaredField("enableRain");//field_76765_S WildlifeEventHandler.rains.setAccessible(true); WildlifeEventHandler.snows = clz.getDeclaredField("enableSnow");//field_76766_R WildlifeEventHandler.snows.setAccessible(true); } catch(NoSuchFieldException e ) { } Basically, I request a private field from a class, set its accessibility to public, so that later I can modify the value (if I don't, the program will crash with an exception). Eg: WildlifeEventHandler.snows.set(BiomeGenBase.plains, true);
-
[1.7.10]How to use Vec3
Vec3.createVectorHelper(x, y, z)
-
replace block with air
world.setBlock(x, y, z, Blocks.air) Just like setting a block to annnything else 'course, there's also the helper function world.setBlockToAir(x, y, z) ... but it just calls the above line anyway.
- Game Crash 1.7.2
-
crashlog..not sure what it means
You don't actually need IProxy or ServerProxy. IProxy here is pointless and generally speaking your "server" proxy is actually the Common proxy.
-
New Furnaces, improving how furnaces are added
Pretty much unless Forge needs to be doing something, it should be left up to the individual developer. Liquids being one example: there needs to be a single way to go "oh that's a liquid" so the various mods that have pumps and pipes can handle every mod liquid the same way. Furnaces? Not really. There's a single furnace recipe repository and that's really all that's needed. Various mods will do their own cooking their own way as their specs require. Some mods might use different fuels, cook faster, cook slower, have a variety of other tweaks and alterations. There's no "good" way to supply a common package for this.
-
New Furnaces, improving how furnaces are added
- [1.7.10] How to convert the code, which works in 1.8 to 1.7.10
No i need slime block and Armorstand with the physics of 1.8 Good luck doing the physics with vanilla code that doesn't exist.- [1.7.10] getFoodStats().setFoodLevel() in event... @SideOnly(value=CLIENT)
It's a potion effect. I don't know how I can be any more clear about this. I opened up the list of potions and look at what I found: public static final Potion field_76443_y = (new PotionHealth(23, false, 16262179)).setPotionName("potion.saturation"); It doesn't have a deobf field name, but it still says "potion.saturation"- [1.7.10] Another FishingRod and FishingHook question, but I guess a simple one.
There are only so many global IDs and if everyone is registering their entity using registerGlobalEntityId, there won't be enough to go around. So instead, you use registerModEntity, which gives you 256 IDs that you, and you alone, can use.- [1.8] Crop texture problem
Uh huh. And neither one of those code snippets is a class named "ModelBakery" nor a class that contains a field called ModelBakery. Or even a reference to the other two.- [1.8] PacketPipeline help
Fuck. Click the thing that says "cast to..." This is why your IDE exists.- [1.8] BlockState Files for custom fluids [SOLVED]
Go to the relevant class, click "edit." GitHub will ask you if you want to fork the project (yes, you do). Edit the relevant function so it does what it is supposed to. If you need to, make sure it compiles and runs properly (do a git pull, edit and test, then git push). Then submit a merge request.- [1.7.10] getFoodStats().setFoodLevel() in event... @SideOnly(value=CLIENT)
Hunger is negative food. That's why I said "Saturation." And my mistake it was 1 half-shank per tick.- [1.7.10] getFoodStats().setFoodLevel() in event... @SideOnly(value=CLIENT)
Yeah, when I was messing around with this, I had to use potion effects. A half-shank worth is like 5 ticks worth of the Saturation effect.- 1.7.10 Please help me with my parallel dimension idea.
Making every block change in one dimension affect the other is going to be neigh impossible.- [1.7.10] How to convert the code, which works in 1.8 to 1.7.10
Also, aren't all of the 1.8 blocks available in 1.7 using Gany's Surface?- [1.7.10] Adding trade to "new" villager type mob
Not sure why the crash, but I am noticing that addDefaultEquipmentAndRecipies does nothing.- [1.8] Java build path error
This ^ How to: https://confluence.atlassian.com/display/DOC/Setting+the+JAVA_HOME+Variable+in+Windows - [1.7.10] How to convert the code, which works in 1.8 to 1.7.10
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.