Jump to content

JuSTGh0sT1242

Members
  • Posts

    4
  • Joined

  • Last visited

JuSTGh0sT1242's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. So, I try to make a katana, with katana and scabbard, is that possible to make 2 different models to be on player while he holding item? Katana in hands, and scabbard at belt.
  2. So basically after spending sometime I fixed that by creating a new renderer for smoke zone.
  3. So basically, I trying to create a "Smoke Bomb", and for that I made Item that throwing a smoke bomb projectile, and after smoke bomb projectile is hit block, it should create entity "smoke zone" but instead of that I got immediately crashed. I can't even make a renderer for this entity in mod class, it give an error, and I honestly don't know WHERE and WHY. public class SmokeBombEntity extends ThrowableItemProjectile { public SmokeBombEntity(EntityType<? extends ThrowableItemProjectile> pEntityType, Level pLevel) { super(pEntityType, pLevel); } public SmokeBombEntity(Level pLevel) { super(ModEntities.SMOKE_BOMB_PROJECTILE.get(), pLevel); } public SmokeBombEntity(Level pLevel, LivingEntity livingEntity) { super(ModEntities.SMOKE_BOMB_PROJECTILE.get(), livingEntity, pLevel); } @Override protected Item getDefaultItem() { return ModItems.SMOKE_BOMB.get(); } @Override protected void onHitBlock(BlockHitResult pResult) { if(!this.level.isClientSide) { SmokeZoneEntity smokeZone = new SmokeZoneEntity(ModEntities.SMOKE_ZONE_ENTITY.get(), level); smokeZone.setPos(getBlockX(),getBlockY(),getBlockZ()); this.level.addFreshEntity(smokeZone); } level.playSound((Player) null, getBlockX(), getBlockY(), getBlockZ(), SoundEvents.GLASS_BREAK, SoundSource.NEUTRAL, 0.5F, 0.4F); this.discard(); super.onHitBlock(pResult); } } public class SmokeZoneEntity extends Entity { public SmokeZoneEntity(EntityType<?> pEntityType, Level pLevel) { super(pEntityType, pLevel); this.noPhysics = true; } public SmokeZoneEntity(Level pLevel, double pX, double pY, double pZ) { this(ModEntities.SMOKE_ZONE_ENTITY.get(), pLevel); this.setPos(pX, pY, pZ); } public SmokeZoneEntity(Level pLevel) { super(ModEntities.SMOKE_ZONE_ENTITY.get(), pLevel); } protected void defineSynchedData() {} protected void readAdditionalSaveData(CompoundTag pCompound) {} protected void addAdditionalSaveData(CompoundTag pCompound) { } public Packet<?> getAddEntityPacket() { return new ClientboundAddEntityPacket(this); } } Also I can't render a smoke zone entity in a mod class, but smoke bomb projectile works completely fine @SubscribeEvent public static void onClientSetup(FMLClientSetupEvent event) { EntityRenderers.register(ModEntities.SMOKE_BOMB_PROJECTILE.get(), ThrownItemRenderer::new); //HERE AN ISSUE EntityRenderers.register(ModEntities.SMOKE_ZONE_ENTITY.get(), EntityRenderer::new); } } } GitHub repository
  4. So basically, I added few recepies, and they worked fine, but this one isnt working at all, I double checked everything, but still isn't managed to find the reason. { "type": "minecraft:crafting_shaped", "pattern": [ "XXX" ], "key": { "X": { "item": "timeofsacrifice:cloth" } }, "result": { "item": "timeofsacrifice:bandage" } } If need code below, and Git is here(I don't think you need to "steal" this code, as someone already cried) { "type": "minecraft:crafting_shaped", "pattern": [ "XXX" ], "key": { "X": { "item": "timeofsacrifice:cloth" } }, "result": { "item": "timeofsacrifice:bandage" } }
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.