Skip to content

Commit

Permalink
feat: improved tags; misc
Browse files Browse the repository at this point in the history
  • Loading branch information
Slexom committed Jan 9, 2021
1 parent 2ecb429 commit fbd9c39
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
public class BoneShardEntity extends ThrownItemEntity {


public BoneShardEntity(World worldIn, LivingEntity throwerIn) {
super(EntityTypesInit.BONE_SHARD_REGISTRY_OBJECT, throwerIn, worldIn);
public BoneShardEntity(World world, LivingEntity owner) {
super(EntityTypesInit.BONE_SHARD_REGISTRY_OBJECT, owner, world);
}

public BoneShardEntity(World worldIn, double x, double y, double z) {
super(EntityTypesInit.BONE_SHARD_REGISTRY_OBJECT, x, y, z, worldIn);
public BoneShardEntity(World world, double x, double y, double z) {
super(EntityTypesInit.BONE_SHARD_REGISTRY_OBJECT, x, y, z, world);
}

public BoneShardEntity(EntityType<BoneShardEntity> entityType, World world) {
Expand All @@ -41,7 +41,7 @@ protected Item getDefaultItem() {
@Environment(EnvType.CLIENT)
private ParticleEffect getParticleParameters() {
ItemStack itemStack = this.getItem();
return (ParticleEffect) (itemStack.isEmpty() ? ParticleTypes.SPIT : new ItemStackParticleEffect(ParticleTypes.ITEM, itemStack));
return itemStack.isEmpty() ? ParticleTypes.SPIT : new ItemStackParticleEffect(ParticleTypes.ITEM, itemStack);
}

@Environment(EnvType.CLIENT)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.network.Packet;
import net.minecraft.network.packet.s2c.play.EntitySpawnS2CPacket;
import net.minecraft.particle.ItemStackParticleEffect;
import net.minecraft.particle.ParticleEffect;
import net.minecraft.particle.ParticleTypes;
Expand All @@ -19,14 +21,13 @@
import slexom.earthtojava.mobs.init.EntityTypesInit;

public class MelonSeedProjectileEntity extends ThrownItemEntity {


public MelonSeedProjectileEntity(World worldIn, LivingEntity throwerIn) {
super(EntityTypesInit.MELON_SEED_PROJECTILE_REGISTRY_OBJECT, throwerIn, worldIn);

public MelonSeedProjectileEntity(World world, LivingEntity owner) {
super(EntityTypesInit.MELON_SEED_PROJECTILE_REGISTRY_OBJECT, owner, world);
}

public MelonSeedProjectileEntity(World worldIn, double x, double y, double z) {
super(EntityTypesInit.MELON_SEED_PROJECTILE_REGISTRY_OBJECT, x, y, z, worldIn);
public MelonSeedProjectileEntity(World world, double x, double y, double z) {
super(EntityTypesInit.MELON_SEED_PROJECTILE_REGISTRY_OBJECT, x, y, z, world);
}

public MelonSeedProjectileEntity(EntityType<MelonSeedProjectileEntity> entityType, World world) {
Expand All @@ -41,7 +42,7 @@ protected Item getDefaultItem() {
@Environment(EnvType.CLIENT)
private ParticleEffect getParticleParameters() {
ItemStack itemStack = this.getItem();
return (ParticleEffect) (itemStack.isEmpty() ? ParticleTypes.ITEM_SNOWBALL : new ItemStackParticleEffect(ParticleTypes.ITEM, itemStack));
return itemStack.isEmpty() ? ParticleTypes.ITEM_SNOWBALL : new ItemStackParticleEffect(ParticleTypes.ITEM, itemStack);
}

@Environment(EnvType.CLIENT)
Expand All @@ -66,8 +67,8 @@ protected void onCollision(HitResult hitResult) {
this.world.sendEntityStatus(this, (byte) 3);
this.remove();
}

}


public Packet<?> createSpawnPacket() {
return new EntitySpawnS2CPacket(this);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@

public class RottenFleshProjectileEntity extends ThrownItemEntity {


public RottenFleshProjectileEntity(World worldIn, LivingEntity throwerIn) {
super(EntityTypesInit.ROTTEN_FLESH_PROJECTILE_REGISTRY_OBJECT, throwerIn, worldIn);
public RottenFleshProjectileEntity(World world, LivingEntity owner) {
super(EntityTypesInit.ROTTEN_FLESH_PROJECTILE_REGISTRY_OBJECT, owner, world);
}

public RottenFleshProjectileEntity(World worldIn, double x, double y, double z) {
super(EntityTypesInit.ROTTEN_FLESH_PROJECTILE_REGISTRY_OBJECT, x, y, z, worldIn);
public RottenFleshProjectileEntity(World world, double x, double y, double z) {
super(EntityTypesInit.ROTTEN_FLESH_PROJECTILE_REGISTRY_OBJECT, x, y, z, world);
}

public RottenFleshProjectileEntity(EntityType<RottenFleshProjectileEntity> entityType, World world) {
Expand All @@ -42,7 +41,7 @@ protected Item getDefaultItem() {
@Environment(EnvType.CLIENT)
private ParticleEffect getParticleParameters() {
ItemStack itemStack = this.getItem();
return (ParticleEffect) (itemStack.isEmpty() ? ParticleTypes.SPIT : new ItemStackParticleEffect(ParticleTypes.ITEM, itemStack));
return itemStack.isEmpty() ? ParticleTypes.SPIT : new ItemStackParticleEffect(ParticleTypes.ITEM, itemStack);
}

@Environment(EnvType.CLIENT)
Expand All @@ -67,7 +66,6 @@ protected void onCollision(HitResult hitResult) {
this.world.sendEntityStatus(this, (byte) 3);
this.remove();
}

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import net.fabricmc.fabric.api.client.rendereregistry.v1.BlockEntityRendererRegistry;
import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.entity.FlyingItemEntityRenderer;
import net.minecraft.entity.EntityType;
import slexom.earthtojava.mobs.client.renderer.entity.*;
Expand All @@ -23,16 +22,14 @@ private static void registerBlockEntityRenderer() {
}

private static void registerProjectileRenderer() {
EntityRendererRegistry.INSTANCE.register(EntityTypesInit.MELON_SEED_PROJECTILE_REGISTRY_OBJECT, (dispatcher, context) -> new FlyingItemEntityRenderer<>(dispatcher, MinecraftClient.getInstance().getItemRenderer()));
EntityRendererRegistry.INSTANCE.register(EntityTypesInit.BONE_SHARD_REGISTRY_OBJECT, (dispatcher, context) -> new FlyingItemEntityRenderer<>(dispatcher, MinecraftClient.getInstance().getItemRenderer()));
EntityRendererRegistry.INSTANCE.register(EntityTypesInit.ROTTEN_FLESH_PROJECTILE_REGISTRY_OBJECT, (dispatcher, context) -> new FlyingItemEntityRenderer<>(dispatcher, MinecraftClient.getInstance().getItemRenderer()));
EntityRendererRegistry.INSTANCE.register(EntityTypesInit.MELON_SEED_PROJECTILE_REGISTRY_OBJECT, (dispatcher, context) -> new FlyingItemEntityRenderer<>(dispatcher, context.getItemRenderer()));
EntityRendererRegistry.INSTANCE.register(EntityTypesInit.BONE_SHARD_REGISTRY_OBJECT, (dispatcher, context) -> new FlyingItemEntityRenderer<>(dispatcher, context.getItemRenderer()));
EntityRendererRegistry.INSTANCE.register(EntityTypesInit.ROTTEN_FLESH_PROJECTILE_REGISTRY_OBJECT, (dispatcher, context) -> new FlyingItemEntityRenderer<>(dispatcher, context.getItemRenderer()));
}

private static void registerEntitiesRenderer() {
registerBaseVariantEntitiesRenderer();
registerSpecialVariantEntitiesRenderer();


}

private static void registerBaseVariantEntitiesRenderer() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
public class FluidRendererInit {

public static void init() {

BlockRenderLayerMap.INSTANCE.putFluids(RenderLayer.getSolid(), FluidInit.MUD_FLUID_FLOWING, FluidInit.MUD_FLUID_STILL);
setupFluidRendering(FluidInit.MUD_FLUID_STILL, FluidInit.MUD_FLUID_FLOWING, 0x472804);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"earthtojavamobs:bone_shard"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"earthtojavamobs:viler_witch"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"earthtojavamobs:skeleton_wolf"
]
}

0 comments on commit fbd9c39

Please sign in to comment.