
Theoretikos
Members-
Posts
15 -
Joined
-
Last visited
Converted
-
Gender
Undisclosed
-
Personal Text
I am new!
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Theoretikos's Achievements

Tree Puncher (2/8)
0
Reputation
-
[1.7.2] Removing clouds and altering sky colour in Overworld
Theoretikos replied to Theoretikos's topic in Modder Support
Solved it. noob error. When I used the Eclipse auto-import-packages-keystroke-thing, it put in import com.sun.xml.internal.stream.Entity; rather than import net.minecraft.entity.Entity; New code: package tutorial.generic.world; import net.minecraft.entity.Entity; import net.minecraft.util.Vec3; import net.minecraft.world.WorldProvider; import net.minecraftforge.client.IRenderHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public abstract class ITWorldProvider extends WorldProvider { // @SideOnly(Side.CLIENT) @Override public Vec3 getFogColor(float var1, float var2) { System.out.println("getFogColor called"); return this.worldObj.getWorldVec3Pool().getVecFromPool((double) 0F / 255F, (double) 0F / 255F, (double) 0F / 255F); } @Override // @SideOnly(Side.CLIENT) public Vec3 getSkyColor(Entity cameraEntity, float partialTicks) { System.out.println("getSkyColor called"); return this.worldObj.getWorldVec3Pool().getVecFromPool(0, 0, 0); } @Override public void setCloudRenderer(IRenderHandler renderer) { System.out.println("setCloudRenderer called"); } } New question: how do I get my WorldProvider used on the Overworld? -
[1.7.2] Removing clouds and altering sky colour in Overworld
Theoretikos replied to Theoretikos's topic in Modder Support
This is doing my head in! I've made an ITWorldProvider that extends WorldProvider: package tutorial.generic.world; import net.minecraft.util.Vec3; import net.minecraft.world.WorldProvider; import com.sun.xml.internal.stream.Entity; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public abstract class ITWorldProvider extends WorldProvider { @Override @SideOnly(Side.CLIENT) public Vec3 getSkyColor(Entity cameraEntity, float partialTicks) { System.out.println("getSkyColor was called."); return this.worldObj.getWorldVec3Pool().getVecFromPool(0, 0, 0); } } But Eclipse puts a redline under "getSkyColor" and give me an error: The method getSkyColor(Entity, float) of the type ITWorldProvider must override or implement a supertype method. I copied the gist of this code from some Galacticraft code. Any ideas what I'm doing wrong? -
Did you ever get an answer for this?
-
[1.7.2] Removing clouds and altering sky colour in Overworld
Theoretikos replied to Theoretikos's topic in Modder Support
I've made an event manager (using a Wuppy tutorial for the base ), and am now figuring how to use the getSkyColor method. I suppose I put it in the generateSurface() method that I've created: -
For those who came after me to find out how to do gravity: The tl:dr is that each item, block, entity handles it's own downward motion. What I did (for jumping entities) was to make a function that would be called on a jumping event: public class GenericJumpEvent { @SubscribeEvent public void onLivingJumpEvent(LivingJumpEvent event) { double addY = 1.38D; // change to the entity's Y motion. event.entity.motionY *= addY; event.entity.velocityChanged = true; } } I then needed to register this event in public void load(FMLInitializationEvent event) in my mod base class. MinecraftForge.EVENT_BUS.register(new GenericJumpEvent()); The effect of this code is that the player and all the other entities now jump a little higher. Questions? Comments? Observations?
-
Thanks. I don't know enough about ticking methods, atm. Is there a tutorial that anyone can point out?
-
You mean, before the world or any entity is loaded ? That isn't possible. As you said, each entity handles its own gravity. Meaning "gravity" only operates in game ticks. You might be interested in the LivingFallEvent and LivingJumpEvent. I kinda want to point out that Minecraft gravity isn't close to the Earth's. What I mean is, I don't want to create a 'Mars' as another dimension, and have the player travel there. And yeah, Minecraft's gravity isn't Earth, true. But I would like to reduce the MC gravity to about 1/4 to give a (relative) experience of being on Mars. Okay, I'll check out those functions. Cheers!
-
Yes. I've been looking through to source to see how it handles gravity. From what I can work out, it's clever but not straight forward. Because each item has its own downward motion, there is a function called getGravity() that figures out what that downward motion is, and then somewhere else changes it in relation to the world the player is on. I think. I'm still unsure how to change this motion in my mod.
-
I am creating a Mars mod that simulates the gravity of Mars. Mars has about a quarter the gravity of Earth. Any suggestions on my plan of attack? Things I know already: I think each item, block and player has a function to handle their own gravity. I want to be able to have the adjusted 'gravity' from the moment the mod loads (no travelling to other dimensions, like with Galacticraft.) How do I adjust the fall rate of each item, block and player? Is there a tutorial for doing a similar universal change withing Minecraft Forge?
-
[1.7.2] Textures not displaying in final mod [RESOLVED]
Theoretikos replied to Theoretikos's topic in Modder Support
No, the textures are there. The issue was that I had the first letter capitalised, where as the code was looking for lowercase. Worked fine in Eclipse, but Minecraft didn't like it. If gradlew build is not putting your textures in the assets folder, check your folder structure in Eclipse. This video goes through a few different structures before getting it right, which I found useful. -
[1.7.2] Textures not displaying in final mod [RESOLVED]
Theoretikos replied to Theoretikos's topic in Modder Support
Perfect. I made the changes and the textures are now displaying. Thank you! -
[1.7.2] Textures not displaying in final mod [RESOLVED]
Theoretikos posted a topic in Modder Support
Everything looks fine in the Eclipse debugging emulator: But then I output the final mode (using gradlew build) and in Minecraft none of the textures are displaying: Here's my file structure. I have a feeling I have my textures in the wrong spot. Any ideas? -
[1.7.2] Custom block problem - effective tools [SOLVED]
Theoretikos replied to Theoretikos's topic in Modder Support
Cheers! Thank you. -
[1.7.2] Custom block problem - effective tools [SOLVED]
Theoretikos posted a topic in Modder Support
I'm having an issue with setting the block harvest level. I'm trying to using setHarvestLevel("shovel",0). Here's the initial code. genericDirt = new GenericBlock(Material.ground) .setHardness(0.5F).setStepSound(Block.soundTypeGravel) .setBlockName("genericDirt").setCreativeTab(CreativeTabs.tabBlock) But then I call setHarvestLevel, and Eclipse doesn't like the result. genericDirt = new GenericBlock(Material.ground) .setHardness(0.5F).setStepSound(Block.soundTypeGravel) .setBlockName("genericDirt").setCreativeTab(CreativeTabs.tabBlock).setHarvestLevel("shovel", 0); (The error reads: "Type mismatch: cannot convert from void to Block.") Is that where I call setHarvestLevel, or should I be calling it somewhere else? Suggestions?