-
Posts
211 -
Joined
-
Last visited
Everything posted by Insane96MCP
-
The event is called clientside only, right? As an example to use GLStateManager?
-
-
So, I managed to mess up with RenderLivingEvent @SubscribeEvent public static void EventRenderLivingPre(RenderLivingEvent.Pre<EntityLivingBase> event) { if (event.getEntity() instanceof EntityZombie) { GL11.glPushMatrix(); GL11.glScalef(2.0f, 2.0f, 2.0f); } } @SubscribeEvent public static void EventRenderLivingPost(RenderLivingEvent.Post<EntityLivingBase> event) { if (event.getEntity() instanceof EntityZombie) { GL11.glPopMatrix(); } } But I'm obiviously doing something wrong But as I'm writing I'm thinking that to do what I want to do, I have to replace the RendererZombie (or whatever mob) with mine and change size there.
-
I just want to make something like bigger zombies when they're stronger, or creepers bigger when they have more explosion power. Not only the hitbox, the model too
-
Replace blocks while the world generates
Insane96MCP replied to Insane96MCP's topic in Modder Support
Thanks to everyone for replying This will come in handy if I'll need to change more than a Property on a block. As now, Replacing the vanilla farmland with modded one on interact does the job. Good to know. -
Replace blocks while the world generates
Insane96MCP replied to Insane96MCP's topic in Modder Support
I really don't know how to do this. Maybe I'll think on using this. I think it's generated only in villages, but I want other cases too with other mods -
Replace blocks while the world generates
Insane96MCP replied to Insane96MCP's topic in Modder Support
Wow so many answers. So. First off, I want a general way to change generation blocks. Isn't that really slow, as Jared pointed out? I've already resolved this with the Hoe Event. I've tried lots of times to replace the vanilla block, but never succeded -
Replace blocks while the world generates
Insane96MCP replied to Insane96MCP's topic in Modder Support
The Log was an example, I actually have a new farmland block. I've added a new Integer Property -
E.g. I've created a farmland that's the same as normal farmland but with more a new property. I want to replace every vanilla farmland that generates in the world (trees, villages, etc.) with my log. What's the best way to do that?
-
I'm still doing something wrong. I've changed to nbt.getTagList("coordinates", Constants.NBT.TAG_COMPOUND); but It still writes and (since there's nothing to read) reads nothing EDIT: Nevermind, I wans't adding back the taglist in the compound Right WriteToNBT() code: @Override public NBTTagCompound writeToNBT(NBTTagCompound compound) { NBTTagCompound pos; NBTTagList tagList = compound.getTagList("coordinates", Constants.NBT.TAG_COMPOUND); for (BlockPos blockPos : portalPositions) { pos = new NBTTagCompound(); pos.setInteger("x", blockPos.getX()); pos.setInteger("y", blockPos.getY()); pos.setInteger("z", blockPos.getZ()); tagList.appendTag(pos); } compound.setTag("coordinates", tagList); return compound; }
-
Today I've tried implementing a world save data into my mod by extending WorldSavedData Seems like it saves property (I mean, write and read nbt are called properly) But as I check the .dat file it is empty. EDIT: I've tried debugging and seems like that this line in WriteToNBT() compound.getTagList("coordinates", Constants.NBT.TAG_LIST).appendTag(pos); is not working properly. If I print the compund it is empty System.err.println("Writing " + blockPos + " aka " + pos + " to " + compound); [14:11:38] [Server thread/INFO]: [STDERR]: Writing BlockPos{x=-151338, y=74, z=-189} aka {x:-151338,y:74,z:-189} to {} [14:11:38] [Server thread/INFO]: [STDERR]: Writing BlockPos{x=-151106, y=76, z=-400} aka {x:-151106,y:76,z:-400} to {} [14:11:38] [Server thread/INFO]: [STDERR]: Writing BlockPos{x=-51186, y=71, z=167} aka {x:-51186,y:71,z:167} to {} [14:11:38] [Server thread/INFO]: [STDERR]: Writing BlockPos{x=-51665, y=70, z=82} aka {x:-51665,y:70,z:82} to {} [14:11:38] [Server thread/INFO]: [STDERR]: Wrote to NBT {} WorldSavedData source code: package net.insane96mcp.naturalnetherportals.events; import java.util.ArrayList; import java.util.List; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.WorldSavedData; import net.minecraftforge.common.util.Constants; public class PortalSavedData extends WorldSavedData { public PortalSavedData() { super(IDENTIFIER); } public PortalSavedData(String name) { super(name); // TODO Auto-generated constructor stub } private List<BlockPos> portalPositions = new ArrayList<BlockPos>(); public List<BlockPos> getPortalPositions(){ return portalPositions; } public boolean addPortalPosition(BlockPos pos) { if (portalPositions.add(pos)) { markDirty(); System.out.println(String.format("Added Portal %d %d %d to list", pos.getX(), pos.getY(), pos.getZ())); return true; } System.err.println("Failed to add portal position to positions list"); return false; } private static final String IDENTIFIER = "naturalnetherportals"; public static PortalSavedData get(World world) { PortalSavedData data = (PortalSavedData)world.loadData(PortalSavedData.class, IDENTIFIER); if (data == null) { data = new PortalSavedData(); world.setData(IDENTIFIER, data); } System.err.println("get"); return data; } @Override public void readFromNBT(NBTTagCompound nbt) { NBTTagList tagList = nbt.getTagList("coordinates", Constants.NBT.TAG_LIST); for (int i = 0; i < tagList.tagCount(); i++) { portalPositions = new ArrayList<BlockPos>(); int x = tagList.getCompoundTagAt(i).getInteger("x"); int y = tagList.getCompoundTagAt(i).getInteger("y"); int z = tagList.getCompoundTagAt(i).getInteger("z"); BlockPos pos = new BlockPos(x, y, z); portalPositions.add(pos); } System.err.println("Read from NBT"); } @Override public NBTTagCompound writeToNBT(NBTTagCompound compound) { NBTTagCompound pos; for (BlockPos blockPos : portalPositions) { pos = new NBTTagCompound(); pos.setInteger("x", blockPos.getX()); pos.setInteger("y", blockPos.getY()); pos.setInteger("z", blockPos.getZ()); compound.getTagList("coordinates", Constants.NBT.TAG_LIST).appendTag(pos); } System.err.println("Wrote to NBT"); return compound; } } NBT .dat file I really don't know what I'm doing wrong here
-
[Solved] Gradle no longer compiling. Empty .jar file
Insane96MCP replied to Insane96MCP's topic in ForgeGradle
Solved The build.gradle for some reasons was missing sourceSets ... -
[Solved] Gradle no longer compiling. Empty .jar file
Insane96MCP replied to Insane96MCP's topic in ForgeGradle
No errors, build successful Another thing that happened is that on older version, instead of compiling an empty jar, compiles an old version of the code -
Today I have updated Forge and mappings in my workspace, after that, when tried to compile only an empty .jar (with Meta-inf) is generated. I'm having an headache ... wth is going on?
-
Does make sense going over 20 armor points?
Insane96MCP replied to Insane96MCP's topic in Modder Support
Oh yep, that https://github.com/MinecraftForge/MinecraftForge/issues/3629 has been fixed in 1.11 only It's still strange that 1.11 and 1.12 differ EDIT: I can now confirm that in 1.10 going over 24 armor points will make you invincible since there's 4% flat damage reduction for every armor point and at 25 armor points you'll have 25*4% = 100% damage reduction. -
Does make sense going over 20 armor points?
Insane96MCP replied to Insane96MCP's topic in Modder Support
Ok, now I know there's something wrong in Minecraft / Forge calculations. Every one of this was tested with 25 armor points + 3 thoughness, Hard Difficulty and always standing in the same spot of the Creeper and full health In 1.10 the creeper dealt no Damage In 1.11 the creeper on shots me In 1.12 I stay alive with ~3 hearts Wth is going on? -
Does make sense going over 20 armor points?
Insane96MCP replied to Insane96MCP's topic in Modder Support
I've just tried having an armor with 25 armor points and 3 thoughness, seems like I take no damage from damage sources that armor reduces. -
Does make sense going over 20 armor points?
Insane96MCP replied to Insane96MCP's topic in Modder Support
I've asked because I've heard somewhere that going over 20 (or 30) would lead to no effects / problems -
I mean, if I have an armor that has 25 armor points, will it reduce damage more than a 20 armor points armor? Talking about 1.10 and up
-
1.11 EntityList.getKey(Entity) equivalent for 1.10?
Insane96MCP replied to Insane96MCP's topic in Modder Support
Oh, that's right .. I'll have to use Cow and such -
I would like to get the entityId of an entity (e.g. minecraft:cow) in 1.10 but getKey() doesn't exist. I've tried with EntityList.getEntityString() but returns Cow and not minecraft:cow