-
Posts
642 -
Joined
-
Last visited
Everything posted by TheRPGAdventurer
-
1.10.2 Problems with making mob shearable.
TheRPGAdventurer replied to TheRPGAdventurer's topic in Modder Support
dude public boolean getSheared() { return (((Byte)this.dataManager.get(DYE_COLOR)).byteValue() & 16) != 0; } /** * make a sheep sheared if set to true */ public void setSheared(boolean sheared) { byte b0 = ((Byte)this.dataManager.get(DYE_COLOR)).byteValue(); if (sheared) { this.dataManager.set(DYE_COLOR, Byte.valueOf((byte)(b0 | 16))); } else { this.dataManager.set(DYE_COLOR, Byte.valueOf((byte)(b0 & -17))); } } what do I do with these methods, I don't have some sort of data for them, but I still want it to be sheared and wait 3 ints, -
1.10.2 Problems with making mob shearable.
TheRPGAdventurer replied to TheRPGAdventurer's topic in Modder Support
also what does that 1 number do? -
1.10.2 Problems with making mob shearable.
TheRPGAdventurer replied to TheRPGAdventurer's topic in Modder Support
If I fixed It i will try to reply with the code to make kids or unexperienced Modders understand, also how do I change the title of this post so it can be easily found by other modders? -
1.10.2 Problems with making mob shearable.
TheRPGAdventurer replied to TheRPGAdventurer's topic in Modder Support
@Override public boolean isShearable(ItemStack item, IBlockAccess world, BlockPos pos) { return !this.isChild(); } @Override public List<ItemStack> onSheared(ItemStack item, IBlockAccess world, BlockPos pos, int fortune) { this.setTamed(true); int i = 1 + this.rand.nextInt(3); java.util.List<ItemStack> ret = new java.util.ArrayList<ItemStack>(); for (int j = 0; j < i; ++j) ret.add(new ItemStack(Item.getItemFromBlock(ModItems.JadeDragonScales), 1, this.getBreedType().getMeta())); this.playSound(SoundEvents.ENTITY_SHEEP_SHEAR, 1.0F, 1.0F); return ret; } Also I want to know what to replace getItemFromBlock to make it use an Item instead of a block. -
1.10.2 Problems with making mob shearable.
TheRPGAdventurer replied to TheRPGAdventurer's topic in Modder Support
I dleted many days ago, let me remake it again. -
Hello Forge, My problem is that "ret.add(new ItemStack(Item.getItemFromBlock(Blocks.WOOL), 1, this.getFleeceColor().getMetadata()));" and the Item I want my mob to drop when sheared is not a block(because of Item.getItemFromBlock) but a pure Item itself, I tried setting it to my Item according to breed but when I shear my mob it drops and untexured block with the same en_US.lang name, when I place it on the ground game crashes.
-
1.10.2 How to make your block flammable
TheRPGAdventurer replied to TheRPGAdventurer's topic in Modder Support
Also what happened to BiomeGenBase from 1.8 was it renamed? -
1.10.2 How to make your block flammable
TheRPGAdventurer replied to TheRPGAdventurer's topic in Modder Support
Small question, what is the flammability of planks, I can't see it in the wiki -
1.10.2 How to make your block flammable
TheRPGAdventurer replied to TheRPGAdventurer's topic in Modder Support
Oh sorry! public BlockPileOfSticks(String unlocalizedName, String registryName) { super(Material.WOOD); this.setUnlocalizedName(unlocalizedName); this.setRegistryName(new ResourceLocation(RealmOfTheDragons.MODID, registryName)); this.setResistance(1); this.setHardness(1); this.setSoundType(SoundType.WOOD); this.setCreativeTab(CreativeTabs.DECORATIONS); } I was using this kind of method and forgot you said @Override -
1.10.2 How to make your block flammable
TheRPGAdventurer replied to TheRPGAdventurer's topic in Modder Support
it shows these 3 (world, pos, face) what do I put in them? -
I get it now, it spawns like the wither skeletons in the nether, most of them will be wither but some of them will be ordinary skeletons, that's why I keep seeing ordinary END dragons in the overworld, I fixed it by changing the default breed END to one of my gem breeds, so it would generate an illusion that the former END dragons that will be spawned will be ruby. If I only knew how to do it that it will only fully spawn the breed I set it.
-
I made the same post recently and It did not and well so I just understood a few things, they said traverse block downwards seeking air but I'm kind of a newbie. ;P. So I want my structure to spawn in a cave system, It's relatively small so It would just fit in, Here is the my world generator https://pastebin.com/NQiBKMiu