
kremi151
-
Posts
14 -
Joined
-
Last visited
Posts posted by kremi151
-
-
Try "block instanceof BlockStairs" instead of "block == instanceof BlockStairs"
-
Ok thank you
-
I don't know if this is the right sub forum to post my issue, if not so please move it to the right one.
Sorry Guest, you are banned from using this forum!Buy the fucking game, we know when you create multiple accounts.
This ban is not set to expire.
This message appears when I try to access the forums without being logged in.
First off, I do not use multiple accounts, I only have this one (I don't know why I should use multiple accounts btw) and second, if you mean by "the fucking game" Minecraft, I already bought this game years ago.
So I hope this is some kind of bug or mistake which will be fixed soon.
-
-
Hi, my mod has an item which can be thrown to catch a mob (similar like catching a Pokémon). The mob NBT data is stored in the item stack. When using the item, an entity will be thrown which detects an impact to catch or release a mob. It worked just fine a while ago, but after upgrading to 1.10.2 there is a random bugging behaviour when I try to catch a mob. Other mobs in the world behave laggy when slapping them or when they walk for example and there is no error thrown in the console. Here is the code:
@Override
protected void onImpact(RayTraceResult mop)
{
if(!this.worldObj.isRemote){
if (mop.entityHit != null && entity_nbt == null && mop.entityHit instanceof EntityLivingBase){
if(MyUtils.checkHasTag(mop.entityHit, DENY_TAG)){
dropEmptySoulPearl(this.posX, this.posY, this.posZ, damage);
if(this.getThrower() != null){
MyUtils.sendChatMessage(getThrower(), "This entity has a protection which makes it uncatchable");
}
this.setDead();
return;
}else{
ItemStack is = new ItemStack(MyItems.SOUL_PEARL, 1);
is.setItemDamage(damage);
if(mop.entityHit.hasCustomName()){
is.setStackDisplayName(mop.entityHit.getCustomNameTag());
}
ItemSoulPearl.catchEntity(is, (EntityLivingBase)mop.entityHit);
mop.entityHit.setDead();
this.worldObj.playSound(this.posX, this.posY, this.posZ, SoundEvents.ENTITY_GENERIC_EXPLODE, SoundCategory.NEUTRAL, 4.0F, (1.0F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.2F) * 0.7F, true);
this.worldObj.spawnParticle(EnumParticleTypes.EXPLOSION_NORMAL, this.posX, this.posY, this.posZ, ((double)this.rand.nextFloat() - 0.5D) * 0.08D, ((double)this.rand.nextFloat() - 0.5D) * 0.08D, ((double)this.rand.nextFloat() - 0.5D) * 0.08D, new int[] {Item.getIdFromItem(MyItems.SOUL_PEARL)});
EntityItem ei = new EntityItem(this.worldObj, mop.entityHit.posX, mop.entityHit.posY, mop.entityHit.posZ, is);
this.worldObj.spawnEntityInWorld(ei);
this.setDead();
return;
}
}else if (entity_nbt != null){
Entity entity = EntityList.createEntityFromNBT(entity_nbt, worldObj);
if(entity == null){
dropEmptySoulPearl(this.posX, this.posY, this.posZ, damage);
this.setDead();
return;
}
entity.setUniqueId(UUID.randomUUID());//if(!can_drop)
if(custom_name != null)entity.setCustomNameTag(custom_name);
entity.setPosition(this.posX, this.posY, this.posZ);
this.worldObj.spawnEntityInWorld(entity);
this.worldObj.playSound(this.posX, this.posY, this.posZ, SoundEvents.ENTITY_GENERIC_EXPLODE, SoundCategory.NEUTRAL, 4.0F, (1.0F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.2F) * 0.7F, true);
this.worldObj.spawnParticle(EnumParticleTypes.EXPLOSION_NORMAL, this.posX, this.posY, this.posZ, ((double)this.rand.nextFloat() - 0.5D) * 0.08D, ((double)this.rand.nextFloat() - 0.5D) * 0.08D, ((double)this.rand.nextFloat() - 0.5D) * 0.08D, new int[] {Item.getIdFromItem(MyItems.SOUL_PEARL)});
}
dropEmptySoulPearl(this.posX, this.posY, this.posZ, damage + 1);
this.setDead();
}
}
private void dropEmptySoulPearl(double x, double y, double z, int damage){
if(can_drop && damage < MyItems.SOUL_PEARL.getMaxDamage()){
ItemStack is = new ItemStack(MyItems.SOUL_PEARL, 1);
is.setItemDamage(damage);
EntityItem ei = new EntityItem(this.worldObj, x, y, z, is);
this.worldObj.spawnEntityInWorld(ei);
}
}
Btw I'm using Forge 12.18.1.2020
-
I found the error, a block which extended BlockDirectional allowed vertical facings but was meant only for horizontal ones. So for vertical facings, it gave a metadata of -1. I fixed it by letting it extend BlockHorizontal. Thank you.
-
Hi, I'm currently updating my mod from 1.8.9 to 1.9. I started with 600+ errors and now I fixed everything, that means nearly everything... I currently get the following error when I try to launch Minecraft from Eclipse:
My code is the following:
MinaMod.getProxy().registerBlock(blockHoneycomb, "honeycomb");
public void registerBlock(Block block, String name, String... variantNames){ GameRegistry.registerBlock(block, name); }
Could it be a bug in Forge itself? I mean it could be possible as Forge for 1.9 has just been released.
-
Thanks, it seems to work now
-
-
Should I send you the whole mod as a zip as a private message?
-
A little update: it is a bug in Forge. I've added two more models for items and now the game crashes for the file strawberrycake_slice1.json...
-
I've checked but my block model is absolutely error free. Here is a comparison between the not working one and a working one:
strawberrycake_slice3.json (the errored one)
{ "parent": "block/cake_slice3", "textures": { "particle": "minamod:blocks/strawberrycake_side", "bottom": "minamod:blocks/strawberrycake_bottom", "top": "minamod:blocks/strawberrycake_top", "side": "minamod:blocks/strawberrycake_side", "inside": "minamod:blocks/strawberrycake_inner" } }
strawberrycake_slice4.json (A working one)
{ "parent": "block/cake_slice4", "textures": { "particle": "minamod:blocks/strawberrycake_side", "bottom": "minamod:blocks/strawberrycake_bottom", "top": "minamod:blocks/strawberrycake_top", "side": "minamod:blocks/strawberrycake_side", "inside": "minamod:blocks/strawberrycake_inner" } }
-
Hi, I've noticed a really strange bug while leads to a crash of the game on start while loading a specific block model:
java.lang.NullPointerException: Initializing game at net.minecraft.client.renderer.block.model.FaceBakery.storeVertexData(FaceBakery.java:124) at net.minecraft.client.renderer.block.model.FaceBakery.fillVertexData(FaceBakery.java:114) at net.minecraft.client.renderer.block.model.FaceBakery.makeQuadVertexData(FaceBakery.java:57) at net.minecraft.client.renderer.block.model.FaceBakery.makeBakedQuad(FaceBakery.java:30) at net.minecraft.client.resources.model.ModelBakery.makeBakedQuad(ModelBakery.java:543) at net.minecraft.client.resources.model.ModelBakery.bakeModel(ModelBakery.java:528) at net.minecraftforge.client.model.ModelLoader.access$1100(ModelLoader.java:51) at net.minecraftforge.client.model.ModelLoader$VanillaModelWrapper.bake(ModelLoader.java:249) at net.minecraftforge.client.model.ModelLoader$WeightedPartWrapper.bake(ModelLoader.java:295) at net.minecraftforge.client.model.ModelLoader$WeightedRandomModel.bake(ModelLoader.java:359) at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:87) at net.minecraft.client.resources.model.ModelManager.onResourceManagerReload(ModelManager.java:29) at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:134) at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:118) at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:736) at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:306) at net.minecraft.client.Minecraft.startGame(Minecraft.java:485) at net.minecraft.client.Minecraft.run(Minecraft.java:325) at net.minecraft.client.main.Main.main(Main.java:117) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) at GradleStart.main(GradleStart.java:45) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.client.renderer.block.model.FaceBakery.storeVertexData(FaceBakery.java:124) at net.minecraft.client.renderer.block.model.FaceBakery.fillVertexData(FaceBakery.java:114) at net.minecraft.client.renderer.block.model.FaceBakery.makeQuadVertexData(FaceBakery.java:57) at net.minecraft.client.renderer.block.model.FaceBakery.makeBakedQuad(FaceBakery.java:30) at net.minecraft.client.resources.model.ModelBakery.makeBakedQuad(ModelBakery.java:543) at net.minecraft.client.resources.model.ModelBakery.bakeModel(ModelBakery.java:528) at net.minecraftforge.client.model.ModelLoader.access$1100(ModelLoader.java:51) at net.minecraftforge.client.model.ModelLoader$VanillaModelWrapper.bake(ModelLoader.java:249) at net.minecraftforge.client.model.ModelLoader$WeightedPartWrapper.bake(ModelLoader.java:295) at net.minecraftforge.client.model.ModelLoader$WeightedRandomModel.bake(ModelLoader.java:359) at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:87) at net.minecraft.client.resources.model.ModelManager.onResourceManagerReload(ModelManager.java:29) at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:134) at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:118) at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:736) at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:306) at net.minecraft.client.Minecraft.startGame(Minecraft.java:485) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.run(Minecraft.java:325) at net.minecraft.client.main.Main.main(Main.java:117) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) at GradleStart.main(GradleStart.java:45)
I've checked the specific block model and there is no error. It is a cake slice model which only differs from the other ones by one number in its json script. I've already replaced it by a nother one but it crashes every time for the given error. Could someone please help me?
[SOLVED!] Ores Aren't Spawning!
in Modder Support
Posted
Try to replace Blocks.iron_ore with Blocks.STONE when calling the addOre method, because it looks like you want to replace iron ores with your money ores instead of normal stone blocks