Everything posted by opssemnik
-
Custom Dimension not generating
and where is the chunk provider?
-
Overriding Air
air blocks are inifnity, they still generate even if the world stop generating
-
Modify default ore generation
Also he can use the populate event, the good its because it will gen the block even if the chunk is already created (good for old worlds) EDIT1: SORRY DOUBLE POST, I THINK MY TABLET DOSENT LIKE THIS FORUM
-
Modify default ore generation
hmm, so they fixed, because when i tried, it cancelled all the minables.
-
Dropping wrong metadata item
because if the player drops the block from inventory, the first metadata will be dropped, also damage dropped its for items too .
-
Make mob drop new items
@PreInit public void LEARNMOREJAVA(FMLPreInitializationEvent e){ MinecraftForge.EVENT_BUS.register(this) } public void DONTBEANOOB(LivingDeathEvent e){ if(e.entity instanceof EntityPig){ e.entity.dropItem(MOD.ITEM.itemID, quantity); } } OR @PreInit public void LEARNMOREJAVA(FMLPreInitializationEvent e){ MinecraftForge.EVENT_BUS.register(this) } public void DONTBEANOOB(LivingDropsEvent e){ if(e.entity instanceof EntityPig){ e.entity.dropItem(MOD.ITEM.itemID, quantity); } }
-
Modify default ore generation
why cancel??/ u will cancel all minables. the best way its getting the block in the event, check if is coal ore, if yes u check if has spawned other in the chunk, if yes and is more than you want, you set the block to stone, or other.
-
Using the player's control keys
u can check the motion, the position, create a key handler, there are a lot of methods...
-
Overriding Air
just check to see if hasNoSky is false. minecraft use this boolean to create a random spawn point in surface (u can take a look how minecraft create this spawn point, because it only creates at surface, but the better way it just see, if hasNoSky returned false, u do the temperature things, the most real way, its getting the biome temperature and checking if is raining or not.
-
Can't install my mod.
one more guy that try to make a mod, but dont know anything about java, the folder nokiamod from the reobf needs to go into the zip, its the package(package its the first thing u need to know),
-
How to Incorporate Experience when crafting an item via new crafting table
take a look at GuiRepair
-
Chunkprovider event Problem
post your chunk provider, chunk manager (if u have) and the portal block.
-
Custom Bucket?
take a look at ItemSaddle, it has itemInteractionForEntity
-
Custom Dimension not generating
if u post the chunk provider it wold be great
-
[1.4.4] Help with ISimpleBlockRenderingHandler
u called two times, the tesselator to draw the same thing.
-
How to change block light level in game?
or just, Block.blocksList[world.getBlockID(x,y,z)].setLightLevel(...)
-
Dropping wrong metadata item
you need to save the meta to nbt, then u do public int damageDropped(int par1){ do stuff }
-
How do I check if another mod is installed? + other similiar questions
its the modid, its needs to be the same from the mod that u are checking, or else the code will not be caled
-
Chunkprovider event Problem
OLD CODE public IChunkProvider getChunkProvider() { return new ChunkProviderTheVoid(worldObj, worldObj.getSeed(), false); } ITS NOW public IChunkProvider createChunkGenerator() { return new ChunkProviderTheVoid(worldObj, worldObj.getSeed(), false); } ...
-
Potion Effect on armor
also, how he can use Scheduladed ticks, if scheduladed ticks just start at the definied tick counts, not when a player wear a armor...
-
Overriding Air
then just check if hasNoSky is false (its a boolean that tells when the player its on surface or not, i think its in world or world provider).
-
How to replace a method/ add a method in a minecraft base class?
in client proxy KeyBindingRegistry.registerKeyBinding(new MyKeys()); then package RPGCraft.central; import java.util.EnumSet; import org.lwjgl.input.Keyboard; import net.minecraft.client.Minecraft; import net.minecraft.client.settings.KeyBinding; import net.minecraft.src.ModLoader; import cpw.mods.fml.client.registry.KeyBindingRegistry.KeyHandler; import cpw.mods.fml.common.TickType; public class MyKeys extends KeyHandler { public QuestKeys(KeyBinding[] keyBindings, boolean[] repeatings) { super(keyBindings, repeatings); // TODO Auto-generated constructor stub } @Override public String getLabel() { return "Quests"; } @Override public void keyDown(EnumSet<TickType> types, KeyBinding kb, boolean tickEnd, boolean isRepeat) { if(!tickEnd ){ //do other things the kb.keyCode its the pressed key System.out.println(kb.keyCode); } } @Override public void keyUp(EnumSet<TickType> types, KeyBinding kb, boolean tickEnd) { // TODO Auto-generated method stub } @Override public EnumSet<TickType> ticks() { // TODO Auto-generated method stub return EnumSet.of(TickType.CLIENT); } }
-
Help with ReplaceBlocksForBiomeEvent
hope this helps @PreInit public void myEventsForBiomes(FMLPreInitializationEvent e){ MinecraftForge.TERRAIN_GEN_BUS.register(this); } @ForgeSubscribe public void my_biomes(BiomeEvent.BlockReplacement e){ if(e.biome.topBlock == Block.grass.blockID){ e.biome.topBlock = (byte)Block.bed.blockID; } } this will change the grass to bed, but u can do other things
-
[Solved]How many ticks is a Minecraft day?
the Part of IScheduladedTickHandler its right, but for the tick time, you can just calculate by the lighting valule like the mobs do.
-
[N Help/Advice Modding] Detection Player->specificBlock [solved]
instead of creating strings and stuff, just create an object of the list, and then you check if the obj instanceof Block.torchWood like //player coordinates int plX = (int)Minecraft.getMinecraft().thePlayer.posX; int plY = (int)Minecraft.getMinecraft().thePlayer.posY; int plZ = (int)Minecraft.getMinecraft().thePlayer.posZ; //the radius of your player->Block detection double boundingBoxRadius = 3; //that it'll work only if the player is there if(Minecraft.getMinecraft().thePlayer != null) { //set the box for collision detection with other boxes AxisAlignedBB var4 = AxisAlignedBB.getBoundingBox(plX, plY, plZ, plX + 1.0D, plY + 1.0D, plZ + 1.0D).expand(boundingBoxRadius , boundingBoxRadius , boundingBoxRadius); //get all colliding boundingBoxes with our var4 box List list = Minecraft.getMinecraft().theWorld.getAllCollidingBoundingBoxes(var4); //only work if theres something in the list if(list != null) { Object obj = list;//or list.iterator; or list.iterator.hasNext(); if(obj instanceof BlockTorch){ System.out.println("FOUND TORCH!"); } }
IPS spam blocked by CleanTalk.