file_name
stringlengths
6
86
file_path
stringlengths
45
249
content
stringlengths
47
6.26M
file_size
int64
47
6.26M
language
stringclasses
1 value
extension
stringclasses
1 value
repo_name
stringclasses
767 values
repo_stars
int64
8
14.4k
repo_forks
int64
0
1.17k
repo_open_issues
int64
0
788
repo_created_at
stringclasses
767 values
repo_pushed_at
stringclasses
767 values
MixinLudicrousFix.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-Avaritia/src/main/java/io/github/crucible/grimoire/mixins/avaritia/MixinLudicrousFix.java
package io.github.crucible.grimoire.mixins.avaritia; import net.minecraft.entity.Entity; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; import org.spongepowered.asm.mixin.Pseudo; @Pseudo @Mixin(targets = "fox/spiteful/avaritia/entity/EntityGapingVoid", remap = false) public abstract class MixinLudicrousFix extends Entity { public MixinLudicrousFix(World p_i1582_1_) { super(p_i1582_1_); } /** * @author juanmuscaria * @reason Desabilitar o buraco negro do avaritia. */ @Overwrite public void func_70071_h_() { super.onUpdate(); this.setDead(); //Nope, quem achou que um buraco negro portátil era uma boa ideia? } }
759
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
IHasGrindingWorld.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-MineFactoryReloaded/src/main/java/io/github/crucible/grimoire/data/minefactoryreloaded/IHasGrindingWorld.java
package io.github.crucible.grimoire.data.minefactoryreloaded; import powercrystals.minefactoryreloaded.world.GrindingWorldServer; public interface IHasGrindingWorld { GrindingWorldServer getGrindingWorld(); }
217
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinTileEntitySlaughterhouse.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-MineFactoryReloaded/src/main/java/io/github/crucible/grimoire/mixins/minefactoryreloaded/MixinTileEntitySlaughterhouse.java
package io.github.crucible.grimoire.mixins.minefactoryreloaded; import io.github.crucible.grimoire.data.minefactoryreloaded.IHasGrindingWorld; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import powercrystals.minefactoryreloaded.tile.machine.TileEntitySlaughterhouse; @Mixin(value = TileEntitySlaughterhouse.class, remap = false) public abstract class MixinTileEntitySlaughterhouse { /** * @author EverNife * @reason Fix NPE on activateMachine in some rare cases * */ @Inject(method = "activateMachine", at = @At("HEAD"), cancellable = true) private void checkPermission(CallbackInfoReturnable<Boolean> cir) { IHasGrindingWorld this_tile = (IHasGrindingWorld) this; if (this_tile.getGrindingWorld() == null) cir.setReturnValue(false); } }
972
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinTileEntityGrinder.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-MineFactoryReloaded/src/main/java/io/github/crucible/grimoire/mixins/minefactoryreloaded/MixinTileEntityGrinder.java
package io.github.crucible.grimoire.mixins.minefactoryreloaded; import io.github.crucible.grimoire.data.minefactoryreloaded.IHasGrindingWorld; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import powercrystals.minefactoryreloaded.tile.machine.TileEntityGrinder; import powercrystals.minefactoryreloaded.world.GrindingWorldServer; @Mixin(value = TileEntityGrinder.class, remap = false) public abstract class MixinTileEntityGrinder implements IHasGrindingWorld { @Shadow protected GrindingWorldServer _grindingWorld; /** * @author EverNife * @reason Fix NPE on activateMachine in some rare cases * */ @Inject(method = "activateMachine", at = @At("HEAD"), cancellable = true) private void checkPermission(CallbackInfoReturnable<Boolean> cir) { if (_grindingWorld == null) cir.setReturnValue(false); } @Override public GrindingWorldServer getGrindingWorld() { return this._grindingWorld; } }
1,184
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinTileEntityAutoSpawner.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-MineFactoryReloaded/src/main/java/io/github/crucible/grimoire/mixins/minefactoryreloaded/MixinTileEntityAutoSpawner.java
package io.github.crucible.grimoire.mixins.minefactoryreloaded; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import powercrystals.minefactoryreloaded.tile.machine.TileEntityAutoSpawner; @Mixin(value = TileEntityAutoSpawner.class, remap = false) public abstract class MixinTileEntityAutoSpawner { @Shadow protected boolean _spawnExact = false; /** * @author EverNife * @reason Hardcode disable the _spawnExact function of MineFactoryRealoded * * Many (too many) mobs can dupe items... */ @Inject(method = "activateMachine", at = @At("HEAD"), cancellable = true) private void checkPermission(CallbackInfoReturnable<Boolean> cir) { if (_spawnExact) _spawnExact = false; } }
956
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinServerPacketHandler.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-MineFactoryReloaded/src/main/java/io/github/crucible/grimoire/mixins/minefactoryreloaded/MixinServerPacketHandler.java
package io.github.crucible.grimoire.mixins.minefactoryreloaded; import cpw.mods.fml.common.network.ByteBufUtils; import io.netty.buffer.ByteBuf; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.network.Packet; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; import powercrystals.minefactoryreloaded.entity.EntityRocket; import powercrystals.minefactoryreloaded.net.Packets; import powercrystals.minefactoryreloaded.net.ServerPacketHandler; import powercrystals.minefactoryreloaded.tile.base.TileEntityFactory; import powercrystals.minefactoryreloaded.tile.machine.*; import powercrystals.minefactoryreloaded.tile.rednet.TileEntityRedNetLogic; @Mixin(value = ServerPacketHandler.class, remap = false) public abstract class MixinServerPacketHandler { /** * @author EverNife * @reason Fix NPE on activateMachine in some rare cases * */ @Overwrite private static Packet readData(ByteBuf data) { TileEntity te; int x, y, z, a; byte amt; World world = DimensionManager.getWorld(data.readInt()); EntityPlayer player; switch (data.readUnsignedShort()) { case Packets.HAMUpdate: x = data.readInt(); y = data.readInt(); z = data.readInt(); te = world.getTileEntity(x, y, z); if (te instanceof TileEntityFactory && ((TileEntityFactory) te).hasHAM()) { return ((TileEntityFactory) te).getHAM().getUpgradePacket(); } break; case Packets.EnchanterButton: // client -> server: autoenchanter GUI buttons x = data.readInt(); y = data.readInt(); z = data.readInt(); te = world.getTileEntity(x, y, z); amt = data.readByte(); if (te instanceof TileEntityAutoEnchanter) { ((TileEntityAutoEnchanter) te).setTargetLevel(((TileEntityAutoEnchanter) te).getTargetLevel() + amt); } else if (te instanceof TileEntityBlockSmasher) { ((TileEntityBlockSmasher) te).setFortune(((TileEntityBlockSmasher) te).getFortune() + amt); } else if (te instanceof TileEntityAutoDisenchanter) { ((TileEntityAutoDisenchanter) te).setRepeatDisenchant(amt == 1 ? true : false); } break; case Packets.HarvesterButton: // client -> server: harvester setting x = data.readInt(); y = data.readInt(); z = data.readInt(); te = world.getTileEntity(x, y, z); if (te instanceof TileEntityHarvester) { ((TileEntityHarvester) te).getSettings().put(ByteBufUtils.readUTF8String(data), data.readBoolean()); } break; case Packets.ChronotyperButton: // client -> server: toggle chronotyper x = data.readInt(); y = data.readInt(); z = data.readInt(); te = world.getTileEntity(x, y, z); if (te instanceof TileEntityChronotyper) { ((TileEntityChronotyper) te).setMoveOld(!((TileEntityChronotyper) te).getMoveOld()); } else if (te instanceof TileEntityDeepStorageUnit) { ((TileEntityDeepStorageUnit) te).setIsActive(!((TileEntityDeepStorageUnit) te).isActive()); ((TileEntityDeepStorageUnit) te).markForUpdate(); Packets.sendToAllPlayersWatching(te); } break; case Packets.AutoJukeboxButton: // client -> server: copy record x = data.readInt(); y = data.readInt(); z = data.readInt(); te = world.getTileEntity(x, y, z); if (te instanceof TileEntityAutoJukebox) { TileEntityAutoJukebox j = ((TileEntityAutoJukebox) te); int button = data.readByte(); if (button == 1) j.playRecord(); else if (button == 2) j.stopRecord(); else if (button == 3) j.copyRecord(); } break; case Packets.AutoSpawnerButton: // client -> server: toggle autospawner x = data.readInt(); y = data.readInt(); z = data.readInt(); te = world.getTileEntity(x, y, z); if (te instanceof TileEntityAutoSpawner) { ((TileEntityAutoSpawner) te).setSpawnExact(!((TileEntityAutoSpawner) te).getSpawnExact()); } break; case Packets.CircuitDefinition: // client -> server: request circuit from server x = data.readInt(); y = data.readInt(); z = data.readInt(); te = world.getTileEntity(x, y, z); if (te instanceof TileEntityRedNetLogic) { ((TileEntityRedNetLogic) te).sendCircuitDefinition(data.readInt()); } break; case Packets.LogicSetCircuit: // client -> server: set circuit x = data.readInt(); y = data.readInt(); z = data.readInt(); te = world.getTileEntity(x, y, z); int circuit = data.readInt(); if (te instanceof TileEntityRedNetLogic) { ((TileEntityRedNetLogic) te).initCircuit(circuit, ByteBufUtils.readUTF8String(data)); ((TileEntityRedNetLogic) te).sendCircuitDefinition(circuit); } break; case Packets.LogicSetPin: // client -> server: set pin x = data.readInt(); y = data.readInt(); z = data.readInt(); te = world.getTileEntity(x, y, z); amt = data.readByte(); int circuitIndex = data.readInt(), pinIndex = data.readInt(), buffer = data.readInt(), pin = data.readInt(); if (te instanceof TileEntityRedNetLogic) { if (amt == 0) { ((TileEntityRedNetLogic) te).setInputPinMapping(circuitIndex, pinIndex, buffer, pin); } else if (amt == 1) { ((TileEntityRedNetLogic) te).setOutputPinMapping(circuitIndex, pinIndex, buffer, pin); } ((TileEntityRedNetLogic) te).sendCircuitDefinition(circuitIndex); } break; case Packets.LogicReinitialize: // client -> server: set circuit x = data.readInt(); y = data.readInt(); z = data.readInt(); te = world.getTileEntity(x, y, z); player = (EntityPlayer) world.getEntityByID(data.readInt()); if (te instanceof TileEntityRedNetLogic) { ((TileEntityRedNetLogic) te).reinitialize(player); } break; case Packets.RouterButton: // client -> server: toggle 'levels'/'reject unmapped' mode x = data.readInt(); y = data.readInt(); z = data.readInt(); te = world.getTileEntity(x, y, z); a = data.readInt(); if (te instanceof TileEntityEnchantmentRouter) { switch (a) { case 2: ((TileEntityItemRouter) te).setRejectUnmapped(!((TileEntityItemRouter) te).getRejectUnmapped()); break; case 1: ((TileEntityEnchantmentRouter) te).setMatchLevels(!((TileEntityEnchantmentRouter) te).getMatchLevels()); break; } } else if (te instanceof TileEntityItemRouter) { ((TileEntityItemRouter) te).setRejectUnmapped(!((TileEntityItemRouter) te).getRejectUnmapped()); } else if (te instanceof TileEntityEjector) { switch (a) { case 1: ((TileEntityEjector) te).setIsWhitelist(!((TileEntityEjector) te).getIsWhitelist()); break; case 2: ((TileEntityEjector) te).setIsNBTMatch(!((TileEntityEjector) te).getIsNBTMatch()); break; case 3: ((TileEntityEjector) te).setIsIDMatch(!((TileEntityEjector) te).getIsIDMatch()); break; } } else if (te instanceof TileEntityAutoAnvil) { ((TileEntityAutoAnvil) te).setRepairOnly(!((TileEntityAutoAnvil) te).getRepairOnly()); } else if (te instanceof TileEntityChunkLoader) { ((TileEntityChunkLoader) te).setRadius((short) a); } else if (te instanceof TileEntityPlanter) { ((TileEntityPlanter) te).setConsumeAll(!((TileEntityPlanter) te).getConsumeAll()); } else if (te instanceof TileEntityMobRouter) { switch (a) { case 1: ((TileEntityMobRouter) te).setWhiteList(!((TileEntityMobRouter) te).getWhiteList()); break; case 2: ((TileEntityMobRouter) te).setMatchMode(((TileEntityMobRouter) te).getMatchMode() + 1); break; case 3: ((TileEntityMobRouter) te).setMatchMode(((TileEntityMobRouter) te).getMatchMode() - 1); break; } } break; case Packets.FakeSlotChange: // client -> server: client clicked on a fake slot // x = data.readInt(); // y = data.readInt(); // z = data.readInt(); // te = world.getTileEntity(x, y, z); player = (EntityPlayer) world.getEntityByID(data.readInt()); if (player != null){ System.out.println("The player [" + player.getCommandSenderName() + "] tried to use xenobyte FakeSlotChange"); } // ItemStack playerStack = player.inventory.getItemStack(); // int slotNumber = data.readInt(), // click = data.readByte(); // if (te instanceof IInventory) { // if (playerStack == null) { // ((IInventory) te).setInventorySlotContents(slotNumber, null); // } else { // playerStack = playerStack.copy(); // playerStack.stackSize = click == 1 ? -1 : 1; // ItemStack s = ((IInventory) te).getStackInSlot(slotNumber); // if (!UtilInventory.stacksEqual(s, playerStack)) // playerStack.stackSize = 1; // else // playerStack.stackSize = Math.max(playerStack.stackSize + s.stackSize, 1); // ((IInventory) te).setInventorySlotContents(slotNumber, playerStack); // } // } break; case Packets.RocketLaunch: // client -> server: client firing SPAMR missile Entity owner = world.getEntityByID(data.readInt()); int t = data.readInt(); Entity target = null; if (t != Integer.MIN_VALUE) { target = world.getEntityByID(t); } if (owner instanceof EntityLivingBase) { EntityRocket r = new EntityRocket(world, ((EntityLivingBase) owner), target); world.spawnEntityInWorld(r); } break; } return null; } }
12,513
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinBlockRubberSapling.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-MineFactoryReloaded/src/main/java/io/github/crucible/grimoire/mixins/minefactoryreloaded/MixinBlockRubberSapling.java
package io.github.crucible.grimoire.mixins.minefactoryreloaded; import net.minecraft.block.BlockSapling; import net.minecraft.world.World; import net.minecraftforge.event.terraingen.TerrainGen; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; import org.spongepowered.asm.mixin.Shadow; import powercrystals.minefactoryreloaded.api.rednet.connectivity.IRedNetNoConnection; import powercrystals.minefactoryreloaded.block.BlockRubberSapling; import powercrystals.minefactoryreloaded.world.WorldGenRubberTree; import java.util.Random; @Mixin(value = BlockRubberSapling.class, remap = false) public abstract class MixinBlockRubberSapling extends BlockSapling implements IRedNetNoConnection { @Shadow private static WorldGenRubberTree treeGen; /** * @author EverNife * @reason Disable the most screwed tree on the entire mod_land, that it's only purpose is to crash servers! */ @Overwrite public void func_149878_d(World world, int xCoord, int yCoord, int zCoord, Random rand) { //"Function growTree" if (!world.isRemote && TerrainGen.saplingGrowTree(world, rand, xCoord, yCoord, zCoord)) { world.setBlockToAir(xCoord, yCoord, zCoord); //"Function growTree but from the treeGen" if (treeGen.growTree(world, rand, xCoord, yCoord, zCoord)) { return; } world.setBlock(xCoord, yCoord, zCoord, this, 0, 4); } } }
1,487
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinEventHandlerEntity.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-Baubles/src/main/java/io/github/crucible/grimoire/mixins/baubles/MixinEventHandlerEntity.java
package io.github.crucible.grimoire.mixins.baubles; import baubles.common.container.InventoryBaubles; import baubles.common.event.EventHandlerEntity; import baubles.common.lib.PlayerHandler; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.MathHelper; import net.minecraftforge.event.entity.player.PlayerDropsEvent; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; //Refer https://github.com/Azanor/Baubles/blob/1.7.10/src/main/java/baubles/common/event/EventHandlerEntity.java @Mixin(value = EventHandlerEntity.class, remap = false) public abstract class MixinEventHandlerEntity { /** * @author EverNife * @reason Adiciona uma checagem extra para itens com soulbound não serem dropados do baubles na morte! */ @Overwrite @SubscribeEvent public void playerDeath(PlayerDropsEvent event) { if (event.entity instanceof EntityPlayer && !event.entity.worldObj.isRemote && !event.entity.worldObj.getGameRules().getGameRuleBooleanValue("keepInventory")) { InventoryBaubles inventoryBaubles = PlayerHandler.getPlayerBaubles(event.entityPlayer); //Edit the function used "inventoryBaubles.dropItemsAt()" Entity e = event.entityPlayer; for (int i = 0; i < 4; ++i) { if (inventoryBaubles.stackList[i] != null) { if (EnchantmentHelper.getEnchantmentLevel(8, inventoryBaubles.stackList[i]) > 0){ // EnchantID 8 is the EnderIO SoulBound ID continue; } EntityItem ei = new EntityItem(e.worldObj, e.posX, e.posY + e.getEyeHeight(), e.posZ, inventoryBaubles.stackList[i].copy()); ei.delayBeforeCanPickup = 40; float f1 = e.worldObj.rand.nextFloat() * 0.5F; float f2 = e.worldObj.rand.nextFloat() * (float) Math.PI * 2.0F; ei.motionX = -MathHelper.sin(f2) * f1; ei.motionZ = MathHelper.cos(f2) * f1; ei.motionY = 0.20000000298023224D; event.drops.add(ei); inventoryBaubles.stackList[i] = null; inventoryBaubles.syncSlotToClients(i); } } } } }
2,581
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinXUHelper.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-ExtraUtilities/src/main/java/io/github/crucible/grimoire/mixins/extrautilities/MixinXUHelper.java
package io.github.crucible.grimoire.mixins.extrautilities; import com.rwtema.extrautils.helper.XUHelper; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Pseudo; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; /** * Created by Frani on 13/06/2017. */ @Pseudo @Mixin(value = XUHelper.class, remap = false) public abstract class MixinXUHelper { @Inject(method = "drainBlock", at = @At("HEAD"), cancellable = true) private static void injectDrainBlock(final World world, final int x, final int y, final int z, final boolean doDrain, CallbackInfoReturnable cir) { if(!world.blockExists(x, y, z)) { cir.cancel(); } } }
855
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinTileEntityTransferNode.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-ExtraUtilities/src/main/java/io/github/crucible/grimoire/mixins/extrautilities/MixinTileEntityTransferNode.java
package io.github.crucible.grimoire.mixins.extrautilities; import com.rwtema.extrautils.ExtraUtils; import com.rwtema.extrautils.tileentity.enderquarry.IChunkLoad; import com.rwtema.extrautils.tileentity.transfernodes.Frequency; import com.rwtema.extrautils.tileentity.transfernodes.TileEntityTransferNode; import com.rwtema.extrautils.tileentity.transfernodes.TileEntityTransferNodeUpgradeInventory; import com.rwtema.extrautils.tileentity.transfernodes.TransferNodeEnderRegistry; import com.rwtema.extrautils.tileentity.transfernodes.nodebuffer.INode; import com.rwtema.extrautils.tileentity.transfernodes.nodebuffer.INodeBuffer; import com.rwtema.extrautils.tileentity.transfernodes.pipes.IPipe; import com.rwtema.extrautils.tileentity.transfernodes.pipes.IPipeCosmetic; import net.minecraft.tileentity.TileEntity; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; import org.spongepowered.asm.mixin.Pseudo; import org.spongepowered.asm.mixin.Shadow; @Pseudo @Mixin(value = TileEntityTransferNode.class, remap = false) public abstract class MixinTileEntityTransferNode extends TileEntity implements IPipe, INode, IPipeCosmetic, IChunkLoad { @Shadow public int pipe_type = 0; @Shadow public TileEntityTransferNodeUpgradeInventory upgrades; @Shadow public boolean isReceiver = false; @Shadow public INodeBuffer buffer; @Shadow public TileEntityTransferNode.SearchType searchType; @Shadow protected int maxCoolDown; @Shadow protected int stepCoolDown; /** * @author EverNife * @reason Desativar os upgrades de velocidade! */ @Overwrite public void calcUpgradeModifiers() { if (this.worldObj != null && !this.worldObj.isRemote) { if (this.isReceiver) { TransferNodeEnderRegistry.clearTileRegistrations(this.buffer); } this.isReceiver = false; this.stepCoolDown = 2; TileEntityTransferNode.SearchType prevSearchType = this.searchType; this.searchType = TileEntityTransferNode.SearchType.RANDOM_WALK; int prev_pipe_type = this.pipe_type; if (this.upgrades.isValidPipeType(this.pipe_type)) { this.pipe_type = 0; } for(int i = 0; i < this.upgrades.getSizeInventory(); ++i) { if (this.upgrades.getStackInSlot(i) != null && ExtraUtils.nodeUpgrade != null && this.upgrades.getStackInSlot(i).getItem() == ExtraUtils.nodeUpgrade) { //if (this.upgrades.getStackInSlot(i).getItemDamage() == 0) { //Mixin Replace maxCooldown with a limit of 6 // for(int k = 0; k < this.upgrades.getStackInSlot(i).stackSize && this.stepCoolDown < 2; ++k) { // ++this.stepCoolDown; // } //} else if (this.upgrades.getStackInSlot(i).getItemDamage() == 6 && this.upgrades.getStackInSlot(i).hasDisplayName()) { TransferNodeEnderRegistry.registerTile(new Frequency(this.upgrades.getStackInSlot(i)), this.buffer); this.isReceiver = true; } else if (this.upgrades.getStackInSlot(i).getItemDamage() == 7) { this.searchType = TileEntityTransferNode.SearchType.DEPTH_FIRST; } else if (this.upgrades.getStackInSlot(i).getItemDamage() == 8) { this.searchType = TileEntityTransferNode.SearchType.BREADTH_FIRST; } } else if (this.upgrades.pipeType(this.upgrades.getStackInSlot(i)) > 0) { this.pipe_type = this.upgrades.pipeType(this.upgrades.getStackInSlot(i)); } } if (prevSearchType != this.searchType) { this.resetSearch(); } if (prev_pipe_type != this.pipe_type) { this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord); } } } @Shadow public void resetSearch() { } }
4,132
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinTileEntityEnderQuarry.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-ExtraUtilities/src/main/java/io/github/crucible/grimoire/mixins/extrautilities/MixinTileEntityEnderQuarry.java
package io.github.crucible.grimoire.mixins.extrautilities; import com.gamerforea.eventhelper.util.EventUtils; import com.rwtema.extrautils.tileentity.enderquarry.TileEntityEnderQuarry; import io.github.crucible.grimoire.forge.core.ITileEntity; import net.minecraft.tileentity.TileEntity; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Pseudo; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; /** * Created by Frani on 12/08/2017. */ @Pseudo @Mixin(value = TileEntityEnderQuarry.class, remap = false) public abstract class MixinTileEntityEnderQuarry extends TileEntity implements ITileEntity { @Inject(method = "mineBlock", at = @At("HEAD"), cancellable = true) public void fireBreak(final int x, final int y, final int z, final boolean replaceWithDirt, CallbackInfoReturnable<Boolean> cir) { if (EventUtils.cantBreak(this.getFakePlayer(), x, y, z)) { cir.setReturnValue(false); } } }
1,092
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinItemLawSword.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-ExtraUtilities/src/main/java/io/github/crucible/grimoire/mixins/extrautilities/MixinItemLawSword.java
package io.github.crucible.grimoire.mixins.extrautilities; import com.rwtema.extrautils.item.ItemLawSword; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; @Mixin(value = ItemLawSword.class) public abstract class MixinItemLawSword { /** * @author EverNife * @reason Disable Kikoku killing on click */ @Overwrite(remap = false) public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) { return true; //Disable this } }
651
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinItemLokiRing.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-Botania/src/main/java/io/github/crucible/grimoire/mixins/botania/MixinItemLokiRing.java
package io.github.crucible.grimoire.mixins.botania; import baubles.common.lib.PlayerHandler; import baubles.common.network.PacketHandler; import baubles.common.network.PacketSyncBauble; import com.gamerforea.eventhelper.util.EventUtils; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.inventory.IInventory; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.ChunkCoordinates; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.event.entity.player.PlayerInteractEvent; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; import org.spongepowered.asm.mixin.Shadow; import vazkii.botania.api.item.ISequentialBreaker; import vazkii.botania.api.mana.ManaItemHandler; import vazkii.botania.common.item.equipment.tool.ToolCommons; import vazkii.botania.common.item.relic.ItemLokiRing; import java.util.List; // TODO: 17/10/2019 Fazer um fix usando só redirect. @Mixin(value = ItemLokiRing.class, remap = false) public abstract class MixinItemLokiRing { @Shadow private static ItemStack getLokiRing(EntityPlayer player) { return null; } @Shadow private static List<ChunkCoordinates> getCursorList(ItemStack stack) { return null; } @Shadow private static ChunkCoordinates getOriginPos(ItemStack stack) { return null; } @Shadow private static void setOriginPos(ItemStack stack, int x, int y, int z) { } @Shadow private static void setCursorList(ItemStack stack, List<ChunkCoordinates> cursors) { } @Shadow private static void addCursor(ItemStack stack, int x, int y, int z) { } /** * @author juanmuscaria * @reason Fix temporário, será trocado para redirects. */ @SuppressWarnings("ConstantConditions") @Overwrite public static void breakOnAllCursors(EntityPlayer player, Item item, ItemStack stack, int x, int y, int z, int side) { ItemStack lokiRing = getLokiRing(player); if (lokiRing == null || player.worldObj.isRemote || !(item instanceof ISequentialBreaker)) return; List<ChunkCoordinates> cursors = getCursorList(lokiRing); ISequentialBreaker breaker = (ISequentialBreaker) item; World world = player.worldObj; boolean silk = EnchantmentHelper.getEnchantmentLevel(Enchantment.silkTouch.effectId, stack) > 0; int fortune = EnchantmentHelper.getEnchantmentLevel(Enchantment.fortune.effectId, stack); boolean dispose = breaker.disposeOfTrashBlocks(stack); for (ChunkCoordinates coords : cursors) { int xp = x + coords.posX; int yp = y + coords.posY; int zp = z + coords.posZ; if (EventUtils.cantBreak(player, x, y, z)) continue; Block block = world.getBlock(xp, yp, zp); breaker.breakOtherBlock(player, stack, xp, yp, zp, x, y, z, side); ToolCommons.removeBlockWithDrops(player, stack, player.worldObj, xp, yp, zp, x, y, z, block, new Material[]{block.getMaterial()}, silk, fortune, block.getBlockHardness(world, xp, yp, zp), dispose); } } /** * @author juanmuscaria * @reason Fix temporário, será trocado para redirects. */ @SuppressWarnings("ConstantConditions") @SubscribeEvent @Overwrite public void onPlayerInteract(PlayerInteractEvent event) { EntityPlayer player = event.entityPlayer; ItemStack lokiRing = getLokiRing(player); if (lokiRing == null || player.worldObj.isRemote) return; int slot = -1; IInventory inv2 = PlayerHandler.getPlayerBaubles(player); for (int i = 0; i < inv2.getSizeInventory(); i++) { ItemStack stack = inv2.getStackInSlot(i); if (stack == lokiRing) { slot = i; break; } } ItemStack heldItemStack = player.getCurrentEquippedItem(); ChunkCoordinates originCoords = getOriginPos(lokiRing); MovingObjectPosition lookPos = ToolCommons.raytraceFromEntity(player.worldObj, player, true, 10F); List<ChunkCoordinates> cursors = getCursorList(lokiRing); int cursorCount = cursors.size(); int cost = Math.min(cursorCount, (int) Math.pow(Math.E, cursorCount * 0.25)); if (heldItemStack == null && event.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK && player.isSneaking()) { if (originCoords.posY == -1 && lookPos != null) { setOriginPos(lokiRing, lookPos.blockX, lookPos.blockY, lookPos.blockZ); setCursorList(lokiRing, null); if (player instanceof EntityPlayerMP) PacketHandler.INSTANCE.sendTo(new PacketSyncBauble(player, slot), (EntityPlayerMP) player); } else if (lookPos != null) { if (originCoords.posX == lookPos.blockX && originCoords.posY == lookPos.blockY && originCoords.posZ == lookPos.blockZ) { setOriginPos(lokiRing, 0, -1, 0); if (player instanceof EntityPlayerMP) PacketHandler.INSTANCE.sendTo(new PacketSyncBauble(player, slot), (EntityPlayerMP) player); } else { addCursor: { int relX = lookPos.blockX - originCoords.posX; int relY = lookPos.blockY - originCoords.posY; int relZ = lookPos.blockZ - originCoords.posZ; for (ChunkCoordinates cursor : cursors) if (cursor.posX == relX && cursor.posY == relY && cursor.posZ == relZ) { cursors.remove(cursor); setCursorList(lokiRing, cursors); if (player instanceof EntityPlayerMP) PacketHandler.INSTANCE.sendTo(new PacketSyncBauble(player, slot), (EntityPlayerMP) player); break addCursor; } addCursor(lokiRing, relX, relY, relZ); if (player instanceof EntityPlayerMP) PacketHandler.INSTANCE.sendTo(new PacketSyncBauble(player, slot), (EntityPlayerMP) player); } } } } else if (heldItemStack != null && event.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK && lookPos != null && player.isSneaking()) { for (ChunkCoordinates cursor : cursors) { int x = lookPos.blockX + cursor.posX; int y = lookPos.blockY + cursor.posY; int z = lookPos.blockZ + cursor.posZ; if (EventUtils.cantBreak(event.entityPlayer, x, y, z)) { event.setCanceled(true); return; } Item item = heldItemStack.getItem(); if (!player.worldObj.isAirBlock(x, y, z) && ManaItemHandler.requestManaExact(lokiRing, player, cost, true)) { item.onItemUse(player.capabilities.isCreativeMode ? heldItemStack.copy() : heldItemStack, player, player.worldObj, x, y, z, lookPos.sideHit, (float) lookPos.hitVec.xCoord - x, (float) lookPos.hitVec.yCoord - y, (float) lookPos.hitVec.zCoord - z); if (heldItemStack.stackSize == 0) { event.setCanceled(true); return; } } } } } }
7,911
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinEntityManaBurst.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-Botania/src/main/java/io/github/crucible/grimoire/mixins/botania/MixinEntityManaBurst.java
package io.github.crucible.grimoire.mixins.botania; import com.gamerforea.eventhelper.util.EventUtils; import io.github.crucible.grimoire.forge.core.IThrowableHook; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityThrowable; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import vazkii.botania.common.entity.EntityManaBurst; @Mixin(value = EntityManaBurst.class, remap = false) public abstract class MixinEntityManaBurst extends EntityThrowable implements IThrowableHook { public MixinEntityManaBurst(World p_i1776_1_) { super(p_i1776_1_); } @Inject(method = "<init>(Lnet/minecraft/entity/player/EntityPlayer;)V", at = @At("RETURN")) private void onConstruct(EntityPlayer player, CallbackInfo ci) { setThrower(player); } @Inject(method = "func_70184_a", at = @At("HEAD"), cancellable = true) private void checkPermission(MovingObjectPosition pos, CallbackInfo ci) { if (this.getThrower() instanceof EntityPlayer) { if (EventUtils.cantBreak((EntityPlayer) this.getThrower(), pos.blockX, pos.blockY, pos.blockZ)) { setDead(); ci.cancel(); } } else { setDead(); ci.cancel(); } } }
1,529
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinItemGravityRod.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-Botania/src/main/java/io/github/crucible/grimoire/mixins/botania/MixinItemGravityRod.java
package io.github.crucible.grimoire.mixins.botania; import com.gamerforea.eventhelper.util.EventUtils; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; import vazkii.botania.common.core.helper.Vector3; import vazkii.botania.common.item.rod.ItemGravityRod; @Mixin(value = ItemGravityRod.class, remap = false) public abstract class MixinItemGravityRod { @Redirect(method = "func_77659_a", at = @At(value = "INVOKE", target = "Lvazkii/botania/common/item/rod/ItemGravityRod;setEntityMotionFromVector(Lnet/minecraft/entity/Entity;Lvazkii/botania/common/core/helper/Vector3;F)V")) private void setEntityMotionFromVectorProxy(Entity entity, Vector3 originalPosVector, float modifier, ItemStack stack, World world, EntityPlayer player) { if (EventUtils.cantDamage(player, entity)) return; ItemGravityRod.setEntityMotionFromVector(entity, originalPosVector, modifier); } }
1,150
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinItemTerraformRod.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-Botania/src/main/java/io/github/crucible/grimoire/mixins/botania/MixinItemTerraformRod.java
package io.github.crucible.grimoire.mixins.botania; import com.gamerforea.eventhelper.util.EventUtils; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; import vazkii.botania.common.item.rod.ItemTerraformRod; @Mixin(value = ItemTerraformRod.class, remap = false) public abstract class MixinItemTerraformRod { @Redirect(method = "terraform", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;func_147449_b(IIILnet/minecraft/block/Block;)Z")) private boolean setBlockProxy(World world, int x, int y, int z, Block block, ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { if (EventUtils.cantBreak(par3EntityPlayer, x, y, z)) return false; else return world.setBlock(x, y, z, block); } }
1,004
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinTileCorporeaIndex.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-Botania/src/main/java/io/github/crucible/grimoire/mixins/botania/MixinTileCorporeaIndex.java
package io.github.crucible.grimoire.mixins.botania; import com.gamerforea.eventhelper.util.EventUtils; import net.minecraftforge.event.ServerChatEvent; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(targets = "vazkii/botania/common/block/tile/corporea/TileCorporeaIndex$InputHandler", remap = false) public abstract class MixinTileCorporeaIndex { @Inject(method = "onChatMessage", at = @At(value = "INVOKE", target = "Lvazkii/botania/common/block/tile/corporea/TileCorporeaIndex;doCorporeaRequest(Ljava/lang/Object;ILvazkii/botania/api/corporea/ICorporeaSpark;)V"), cancellable = true) private void doCorporeaRequestProxy(ServerChatEvent event, CallbackInfo ci) { if (EventUtils.cantBreak(event.player, event.player.posX, event.player.posY, event.player.posZ)) ci.cancel(); } }
974
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinEntityThornChakram.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-Botania/src/main/java/io/github/crucible/grimoire/mixins/botania/MixinEntityThornChakram.java
package io.github.crucible.grimoire.mixins.botania; import com.gamerforea.eventhelper.util.EventUtils; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityThrowable; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import vazkii.botania.common.entity.EntityThornChakram; @Mixin(value = EntityThornChakram.class, remap = false) public abstract class MixinEntityThornChakram extends EntityThrowable { public MixinEntityThornChakram(World world) { super(world); } @Inject(method = "func_70184_a", at = @At("HEAD"), cancellable = true) private void checkPermission(MovingObjectPosition pos, CallbackInfo ci) { if (getThrower() instanceof EntityPlayer && pos.entityHit instanceof EntityLivingBase && EventUtils.cantDamage(this.getThrower(), pos.entityHit)) { setDead(); ci.cancel(); } } }
1,190
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinToolCommons.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-Botania/src/main/java/io/github/crucible/grimoire/mixins/botania/MixinToolCommons.java
package io.github.crucible.grimoire.mixins.botania; import com.gamerforea.eventhelper.util.EventUtils; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import vazkii.botania.common.item.equipment.tool.ToolCommons; @Mixin(value = ToolCommons.class, remap = false) public abstract class MixinToolCommons { @Inject(method = "removeBlockWithDrops(Lnet/minecraft/entity/player/EntityPlayer;Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;IIIIIILnet/minecraft/block/Block;[Lnet/minecraft/block/material/Material;ZIFZZ)V", at = @At(value = "HEAD"), cancellable = true) private static void removeBlockWithDropsCheck(EntityPlayer player, ItemStack stack, World world, int x, int y, int z, int bx, int by, int bz, Block block, Material[] materialsListing, boolean silk, int fortune, float blockHardness, boolean dispose, boolean particles, CallbackInfo ci) { if (world.blockExists(x, y, z) && EventUtils.cantBreak(player, x, y, z)) ci.cancel(); } }
1,334
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinItemWorldSeed.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-Botania/src/main/java/io/github/crucible/grimoire/mixins/botania/MixinItemWorldSeed.java
package io.github.crucible.grimoire.mixins.botania; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.common.util.FakePlayer; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import vazkii.botania.common.item.ItemWorldSeed; @Mixin(value = ItemWorldSeed.class, remap = false) public abstract class MixinItemWorldSeed { @Inject(method = "func_77659_a", at = @At("HEAD"), cancellable = true) private void checkPlayer(ItemStack stack, World world, EntityPlayer player, CallbackInfoReturnable<ItemStack> ci) { if (player instanceof FakePlayer) { ci.setReturnValue(stack); ci.cancel(); } } }
909
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinEntityVineBall.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-Botania/src/main/java/io/github/crucible/grimoire/mixins/botania/MixinEntityVineBall.java
package io.github.crucible.grimoire.mixins.botania; import com.gamerforea.eventhelper.util.EventUtils; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityThrowable; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import vazkii.botania.common.entity.EntityVineBall; @Mixin(value = EntityVineBall.class, remap = false) public abstract class MixinEntityVineBall extends EntityThrowable { public MixinEntityVineBall(World world) { super(world); } @Inject(method = "func_70184_a", at = @At("HEAD"), cancellable = true) private void checkPermission(MovingObjectPosition pos, CallbackInfo ci) { if (this.getThrower() instanceof EntityPlayer) { if (EventUtils.cantBreak((EntityPlayer) this.getThrower(), pos.blockX, pos.blockY, pos.blockZ)) { setDead(); ci.cancel(); } } } }
1,160
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinTileSpreader.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-Botania/src/main/java/io/github/crucible/grimoire/mixins/botania/MixinTileSpreader.java
package io.github.crucible.grimoire.mixins.botania; import io.github.crucible.grimoire.forge.core.IThrowableHook; import io.github.crucible.grimoire.forge.core.ITileEntity; import net.minecraft.item.ItemStack; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; import vazkii.botania.common.block.tile.mana.TileSpreader; import vazkii.botania.common.entity.EntityManaBurst; @Mixin(value = TileSpreader.class, remap = false) public abstract class MixinTileSpreader implements ITileEntity { @Redirect(method = "getBurst", at = @At(value = "INVOKE", target = "Lvazkii/botania/common/entity/EntityManaBurst;setSourceLens(Lnet/minecraft/item/ItemStack;)V")) private void setSourceLensProxy(EntityManaBurst entity, ItemStack lens) { ((IThrowableHook) entity).setThrower(this.getFakePlayer()); entity.setSourceLens(lens); } }
945
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinItemGrassHorn.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-Botania/src/main/java/io/github/crucible/grimoire/mixins/botania/MixinItemGrassHorn.java
package io.github.crucible.grimoire.mixins.botania; import com.gamerforea.eventhelper.util.EventUtils; import net.minecraft.block.Block; import net.minecraft.block.BlockBush; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.util.ChunkCoordinates; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; import vazkii.botania.api.item.IGrassHornExcempt; import vazkii.botania.api.item.IHornHarvestable; import vazkii.botania.api.subtile.ISpecialFlower; import vazkii.botania.common.core.handler.ConfigHandler; import vazkii.botania.common.item.ItemGrassHorn; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Random; @Mixin(value = ItemGrassHorn.class, remap = false) public abstract class MixinItemGrassHorn { @Redirect(method = "onUsingTick", at = @At(value = "INVOKE", target = "Lvazkii/botania/common/item/ItemGrassHorn;breakGrass(Lnet/minecraft/world/World;Lnet/minecraft/item/ItemStack;IIII)V")) private void breakGrassProxy(World world, ItemStack stack, int stackDmg, int srcx, int srcy, int srcz, ItemStack stack2, EntityPlayer player, int time) { breakGrassFix(world, stack, stackDmg, srcx, srcy, srcz, player); } @SuppressWarnings({"CollectionAddAllCanBeReplacedWithConstructor", "unchecked"}) private void breakGrassFix(World world, ItemStack stack, int stackDmg, int srcx, int srcy, int srcz, EntityPlayer player) { IHornHarvestable.EnumHornType type = IHornHarvestable.EnumHornType.getTypeForMeta(stackDmg); Random rand = new Random(srcx ^ srcy ^ srcz); int range = 12 - stackDmg * 3; int rangeY = 3 + stackDmg * 4; List<ChunkCoordinates> coords = new ArrayList(); for (int i = -range; i < range + 1; i++) for (int j = -range; j < range + 1; j++) for (int k = -rangeY; k < rangeY + 1; k++) { int x = srcx + i; int y = srcy + k; int z = srcz + j; if (EventUtils.cantBreak(player, x, y, z)) continue; Block block = world.getBlock(x, y, z); if (block instanceof IHornHarvestable ? ((IHornHarvestable) block).canHornHarvest(world, x, y, z, stack, type) : stackDmg == 0 && block instanceof BlockBush && !(block instanceof ISpecialFlower) && (!(block instanceof IGrassHornExcempt) || ((IGrassHornExcempt) block).canUproot(world, x, y, z)) || stackDmg == 1 && block.isLeaves(world, x, y, z) || stackDmg == 2 && block == Blocks.snow_layer) coords.add(new ChunkCoordinates(x, y, z)); } Collections.shuffle(coords, rand); int count = Math.min(coords.size(), 32 + stackDmg * 16); for (int i = 0; i < count; i++) { ChunkCoordinates currCoords = coords.get(i); List<ItemStack> items = new ArrayList(); Block block = world.getBlock(currCoords.posX, currCoords.posY, currCoords.posZ); int meta = world.getBlockMetadata(currCoords.posX, currCoords.posY, currCoords.posZ); items.addAll(block.getDrops(world, currCoords.posX, currCoords.posY, currCoords.posZ, meta, 0)); if (block instanceof IHornHarvestable && ((IHornHarvestable) block).hasSpecialHornHarvest(world, currCoords.posX, currCoords.posY, currCoords.posZ, stack, type)) ((IHornHarvestable) block).harvestByHorn(world, currCoords.posX, currCoords.posY, currCoords.posZ, stack, type); else if (!world.isRemote) { world.setBlockToAir(currCoords.posX, currCoords.posY, currCoords.posZ); if (ConfigHandler.blockBreakParticles) world.playAuxSFX(2001, currCoords.posX, currCoords.posY, currCoords.posZ, Block.getIdFromBlock(block) + (meta << 12)); for (ItemStack stack_ : items) world.spawnEntityInWorld(new EntityItem(world, currCoords.posX + 0.5, currCoords.posY + 0.5, currCoords.posZ + 0.5, stack_)); } } } }
4,283
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinItemExchangeRod.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-Botania/src/main/java/io/github/crucible/grimoire/mixins/botania/MixinItemExchangeRod.java
package io.github.crucible.grimoire.mixins.botania; import com.gamerforea.eventhelper.util.EventUtils; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import vazkii.botania.common.item.rod.ItemExchangeRod; @Mixin(value = ItemExchangeRod.class, remap = false) public abstract class MixinItemExchangeRod { @Inject(method = "exchange", at = @At("HEAD"), cancellable = true) private void checkPermission(World world, EntityPlayer player, int x, int y, int z, ItemStack stack, Block blockToSet, int metaToSet, CallbackInfoReturnable<Boolean> ci) { if (world.blockExists(x, y, z) && EventUtils.cantBreak(player, x, y, z)) { ci.setReturnValue(false); ci.cancel(); } } }
1,046
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinItemRainbowRod.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-Botania/src/main/java/io/github/crucible/grimoire/mixins/botania/MixinItemRainbowRod.java
package io.github.crucible.grimoire.mixins.botania; import com.gamerforea.eventhelper.util.EventUtils; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; import vazkii.botania.common.item.rod.ItemRainbowRod; @Mixin(value = ItemRainbowRod.class, remap = false) public abstract class MixinItemRainbowRod { @Redirect(method = "func_77659_a", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;func_147449_b(IIILnet/minecraft/block/Block;)Z")) private boolean setBlockProxy(World world, int x, int y, int z, Block block, ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { if (EventUtils.cantBreak(par3EntityPlayer, x, y, z)) return false; else return world.setBlock(x, y, z, block); } }
1,000
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinEntityEnderAirBottle.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-Botania/src/main/java/io/github/crucible/grimoire/mixins/botania/MixinEntityEnderAirBottle.java
package io.github.crucible.grimoire.mixins.botania; import net.minecraft.entity.projectile.EntityThrowable; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; import vazkii.botania.common.entity.EntityEnderAirBottle; @Mixin(value = EntityEnderAirBottle.class, remap = false) public abstract class MixinEntityEnderAirBottle extends EntityThrowable { public MixinEntityEnderAirBottle(World world) { super(world); } /** * @author juanmuscaria * @reason Desativa o impacto da garrafa. */ @Overwrite protected void func_70184_a(MovingObjectPosition pos) { setDead(); } }
743
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinItemSmeltRod.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-Botania/src/main/java/io/github/crucible/grimoire/mixins/botania/MixinItemSmeltRod.java
package io.github.crucible.grimoire.mixins.botania; import com.gamerforea.eventhelper.util.EventUtils; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; import vazkii.botania.common.item.rod.ItemSmeltRod; @Mixin(value = ItemSmeltRod.class, remap = false) public abstract class MixinItemSmeltRod { @Redirect(method = "onUsingTick", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;func_147465_d(IIILnet/minecraft/block/Block;II)Z")) private boolean setBlockProxy(World world, int x, int y, int z, Block block, int i1, int i2, ItemStack stack, EntityPlayer p, int time) { if (EventUtils.cantBreak(p, x, y, z)) return false; else return world.setBlock(x, y, z, block, i1, i2); } }
973
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinExplosivePrimed.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-TinkersConstruct/src/main/java/io/github/crucible/grimoire/mixins/tinkersconstruct/MixinExplosivePrimed.java
package io.github.crucible.grimoire.mixins.tinkersconstruct; import net.minecraft.entity.Entity; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; import tconstruct.mechworks.entity.item.ExplosivePrimed; @Mixin (value = ExplosivePrimed.class, remap = false) public abstract class MixinExplosivePrimed extends Entity { public MixinExplosivePrimed(String string) { super(null); throw new RuntimeException("This should never run!"); } /** * @author Rehab_CZ * @reason Replaced with default explosions (GPP can catch this) */ @Overwrite public void createExplosion (World world, Entity par1Entity, double par2, double par4, double par6, float par8) { world.createExplosion(par1Entity, par2, par4, par6, par8, true).exploder = par1Entity; } }
881
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinEntityIC2Explosive.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-IndustrialCraft/src/main/java/io/github/crucible/grimoire/mixins/industrialcraft/MixinEntityIC2Explosive.java
package io.github.crucible.grimoire.mixins.industrialcraft; import ic2.core.block.EntityIC2Explosive; import net.minecraft.entity.Entity; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; import org.spongepowered.asm.mixin.Shadow; @Mixin (value = EntityIC2Explosive.class, remap = false) public abstract class MixinEntityIC2Explosive extends Entity { @Shadow public float explosivePower; public MixinEntityIC2Explosive(String string) { super(null); } /** * @author Rehab_CZ * @reason USe default explosions */ @Overwrite private void explode() { this.worldObj.createExplosion(this,posX, posY, posZ, this.explosivePower, true).exploder = this; } }
749
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinEntityMiningLaser.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-IndustrialCraft/src/main/java/io/github/crucible/grimoire/mixins/industrialcraft/MixinEntityMiningLaser.java
package io.github.crucible.grimoire.mixins.industrialcraft; import com.gamerforea.eventhelper.util.EventUtils; import ic2.api.event.LaserEvent; import ic2.core.item.tool.EntityMiningLaser; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; import org.spongepowered.asm.mixin.Shadow; import static ic2.core.item.tool.EntityMiningLaser.unmineableBlocks; @Mixin(value = EntityMiningLaser.class, remap = false) public abstract class MixinEntityMiningLaser extends Entity { public MixinEntityMiningLaser(String someString) { super(null); } @Shadow public abstract boolean takeDataFromEvent(LaserEvent aEvent); @Shadow public EntityLivingBase owner; /** * @author Rehab_CZ * @reason Minig laser fix */ @Overwrite public boolean canMine(Block block) { if (EventUtils.cantBreak((EntityPlayer)this.owner,posX, posY, posZ)){ return false; } return !unmineableBlocks.contains(block); } }
1,184
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinTinkersDefense.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-TinkersDefense/src/main/java/io/github/crucible/grimoire/mixins/tinkersdefense/MixinTinkersDefense.java
package io.github.crucible.grimoire.mixins.tinkersdefense; import cpw.mods.fml.common.FMLLog; import lance5057.tDefense.TinkersDefense; import net.minecraft.command.ICommand; import net.minecraftforge.client.ClientCommandHandler; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; @Mixin(value = TinkersDefense.class, remap = true) public abstract class MixinTinkersDefense { /** * @author EverNife * @reason The mod should not register client commands on the server side * @return */ @Redirect(method = "preInit", at = @At(value = "INVOKE", target = "Lnet/minecraftforge/client/ClientCommandHandler;registerCommand(Lnet/minecraft/command/ICommand;)Lnet/minecraft/command/ICommand;")) //ClientCommandHandler public ICommand preInit(ClientCommandHandler instance, ICommand iCommand) { FMLLog.warning("Ignoring registraion of the command [" + iCommand.getCommandName() +"] as it is ClientSide!"); return iCommand; } }
1,066
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinItemCursor.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-OpenBlocks/src/main/java/io/github/crucible/grimoire/mixins/openblocks/MixinItemCursor.java
package io.github.crucible.grimoire.mixins.openblocks; import com.gamerforea.eventhelper.util.EventUtils; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import openblocks.common.item.ItemCursor; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; import org.spongepowered.asm.mixin.Shadow; @Mixin(value = ItemCursor.class, remap = false) public abstract class MixinItemCursor { @Shadow private static void clickBlock(World world, EntityPlayer player, int x, int y, int z, int side) {} /** * @author EverNife * @reason Proteger baus e interfaces que estejam em terreno de outros jogadores */ @Overwrite public ItemStack func_77659_a(ItemStack itemStack, World world, EntityPlayer player) { if (world.isRemote) { return itemStack; } else { NBTTagCompound tag = itemStack.getTagCompound(); if (tag != null && tag.hasKey("x") && tag.hasKey("y") && tag.hasKey("z") && tag.hasKey("dimension")) { int x = tag.getInteger("x"); int y = tag.getInteger("y"); int z = tag.getInteger("z"); int dimension = tag.getInteger("dimension"); if (world.provider.dimensionId == dimension && world.blockExists(x, y, z)) { if (!EventUtils.cantBreak(player, x, y, z)){ clickBlock(world, player, x, y, z, tag.getInteger("side")); } } } return itemStack; } } }
1,671
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinUtilityCommands.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-WorldEdit/src/main/java/io/github/crucible/grimoire/mixins/worldedit/MixinUtilityCommands.java
package io.github.crucible.grimoire.mixins.worldedit; import com.sk89q.minecraft.util.commands.Command; import com.sk89q.minecraft.util.commands.CommandException; import com.sk89q.worldedit.command.UtilityCommands; import com.sk89q.worldedit.extension.platform.Actor; import com.sk89q.worldedit.util.command.binding.Text; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; @Mixin(value = UtilityCommands.class, remap = false) public abstract class MixinUtilityCommands { /** * @author EverNife * @reason I do not like this command, it can crash your server! * */ @Overwrite(remap = false) @Command( aliases = {"/calc", "/calculate", "/eval", "/evaluate", "/solve"}, usage = "<expression>", desc = "Evaluate a mathematical expression" ) public void calc(Actor actor, @Text String input) throws CommandException { actor.printError("This command was disabled!"); } }
979
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinContainerPartAcraneCraftingTerminal.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-ThaumicEnergistics/src/main/java/io/github/crucible/grimoire/mixins/thaumicenergistics/MixinContainerPartAcraneCraftingTerminal.java
package io.github.crucible.grimoire.mixins.thaumicenergistics; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; import thaumicenergistics.common.container.ContainerPartArcaneCraftingTerminal; @Mixin(value = ContainerPartArcaneCraftingTerminal.class, remap = false) public abstract class MixinContainerPartAcraneCraftingTerminal { /** * @author EverNife * @reason There are some dupes caused by the SHIFT-CLICK, * better justa disable it... * * * func_82846_b == transferStackInSlot */ @Overwrite public ItemStack func_82846_b(EntityPlayer player, int slotNumber) { return null; } }
768
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinThETileInventory.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-ThaumicEnergistics/src/main/java/io/github/crucible/grimoire/mixins/thaumicenergistics/MixinThETileInventory.java
package io.github.crucible.grimoire.mixins.thaumicenergistics; import net.minecraft.item.ItemStack; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; import thaumicenergistics.common.tiles.abstraction.ThETileInventory; @Mixin(value = ThETileInventory.class, remap = false) public abstract class MixinThETileInventory { /** * @author EverNife * @reason Tentativa resolve o dupe; * * Testes em campo foram inconclusivos quantos a eficácia dessa mudança! * * * func_70298_a == decrStackSize * \--> Removes from an inventory slot (first arg) up to a * specified number (second arg) of items and returns them * in a new stack. */ @Overwrite public ItemStack func_70298_a(int slotIndex, int amount) { return null; } }
834
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinTileEntityBetterFurnace.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-BetterFurnaces/src/main/java/io/github/crucible/grimoire/mixins/betterfurnaces/MixinTileEntityBetterFurnace.java
package io.github.crucible.grimoire.mixins.betterfurnaces; import at.flabs.betterfurnaces.BetterFurnaces; import at.flabs.betterfurnaces.core.TileEntityBetterFurnace; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; import org.spongepowered.asm.mixin.Shadow; import java.util.Arrays; @Mixin(value = TileEntityBetterFurnace.class, remap = false) public abstract class MixinTileEntityBetterFurnace { @Shadow private byte facing; @Shadow public boolean storage; @Shadow public abstract ItemStack getUpgrade(Item upgrade); @Shadow public abstract byte getAbsoluteSide(byte relative, byte standart); /** * @author EverNife * * @reason I hate spam :D * * If you have a console spam like this: * * [4] 0, 1, 5 * [1] 0, 1, 5 * [4, 5] 0, 3, 1 * [4, 5] 0, 3, 1 * * Like spaming over 10 times a second, well, this override fix it '-' */ @Overwrite public int[] func_94128_d(int side) { if (side == this.facing) { return new int[]{6, 7, 8}; } else { ItemStack is = this.getUpgrade(BetterFurnaces.instance.upg.itemPiping); if (is != null) { byte out = this.getAbsoluteSide(BetterFurnaces.instance.upg.itemPiping.getSide("Out", is), (byte)0); byte in = this.getAbsoluteSide(BetterFurnaces.instance.upg.itemPiping.getSide("In", is), (byte)1); byte fin = this.getAbsoluteSide(BetterFurnaces.instance.upg.itemPiping.getSide("Fin", is), (byte)1); int[] res = new int[0]; if (side == out) { res = Arrays.copyOf(res, res.length + (this.storage ? 2 : 1)); if (this.storage) { res[res.length - 2] = 4; } res[res.length - 1] = this.storage ? 5 : 4; } if (side == in) { res = Arrays.copyOf(res, res.length + (this.storage ? 2 : 1)); if (this.storage) { res[res.length - 2] = 1; } res[res.length - 1] = this.storage ? 0 : 1; } if (side == fin) { res = Arrays.copyOf(res, res.length + (this.storage ? 2 : 1)); if (this.storage) { res[res.length - 2] = 3; } res[res.length - 1] = this.storage ? 2 : 3; } //GRIMOIRE START //System.out.println(Arrays.toString(res) + " " + out + ", " + in + ", " + fin); //Comment this line! //GRIMOIRE END return res; } else if (side == 1) { return this.storage ? new int[]{1, 0} : new int[]{1}; } else if (side == 0) { return this.storage ? new int[]{4, 5} : new int[]{4}; } else { return this.storage ? new int[]{3, 2} : new int[]{3}; } } } }
3,163
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinItemTFZombieWand.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-TwilightForest/src/main/java/io/github/crucible/grimoire/mixins/twilightforest/MixinItemTFZombieWand.java
package io.github.crucible.grimoire.mixins.twilightforest; import com.gamerforea.eventhelper.util.EventUtils; import cpw.mods.fml.common.FMLLog; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; import org.spongepowered.asm.mixin.Shadow; import twilightforest.entity.EntityTFLoyalZombie; import twilightforest.item.ItemTF; import twilightforest.item.ItemTFZombieWand; @Mixin(value = ItemTFZombieWand.class, remap = false) public abstract class MixinItemTFZombieWand extends ItemTF { @Shadow protected abstract MovingObjectPosition getPlayerPointVec(World worldObj, EntityPlayer player, float range); /** * @author Rehab_CZ * @reason Fire events before spawning loyal zombie */ @Overwrite public ItemStack onItemRightClick(ItemStack par1ItemStack, World worldObj, EntityPlayer player) { if (par1ItemStack.getItemDamage() < this.getMaxDamage()) { player.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack)); if (!worldObj.isRemote) { MovingObjectPosition mop = getPlayerPointVec(worldObj, player, 20.0F); if (mop != null && !EventUtils.cantBreak(player, mop.blockX, mop.blockY, mop.blockZ)) { EntityTFLoyalZombie zombie = new EntityTFLoyalZombie(worldObj); zombie.setPositionAndRotation(mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, 1.0F, 1.0F); /// NPE here needs to be fixed zombie.setTamed(true); try { zombie.func_152115_b(player.getUniqueID().toString()); } catch (NoSuchMethodError ex) { FMLLog.warning("[TwilightForest] Could not determine player name for loyal zombie, ignoring error."); } zombie.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 1200, 1)); worldObj.spawnEntityInWorld(zombie); par1ItemStack.damageItem(1, player); } } } else { player.stopUsingItem(); } return par1ItemStack; } }
2,428
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinItemTFTransformPowder.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-TwilightForest/src/main/java/io/github/crucible/grimoire/mixins/twilightforest/MixinItemTFTransformPowder.java
package io.github.crucible.grimoire.mixins.twilightforest; import com.gamerforea.eventhelper.util.EventUtils; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; import org.spongepowered.asm.mixin.Shadow; import twilightforest.item.ItemTF; import twilightforest.item.ItemTFTransformPowder; @Mixin(value = ItemTFTransformPowder.class, remap = false) public abstract class MixinItemTFTransformPowder extends ItemTF { @Shadow public abstract Class<? extends EntityLivingBase> getMonsterTransform(Class<? extends EntityLivingBase> originalMonster); /** * @author Rehab_CZ * @reason Fire events before transforming animal */ @Overwrite public boolean itemInteractionForEntity(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, EntityLivingBase target) { Class<?> transformClass = getMonsterTransform(target.getClass()); if (EventUtils.cantBreak(par2EntityPlayer, target.posX, target.posY, target.posZ)) { return true; } if (transformClass != null) { if (target.worldObj.isRemote) { if (target instanceof EntityLiving) { ((EntityLiving) target).spawnExplosionParticle(); ((EntityLiving) target).spawnExplosionParticle(); } target.worldObj.playSound(target.posX + 0.5D, target.posY + 0.5D, target.posZ + 0.5D, "mob.zombie.remedy", 1.0F + itemRand.nextFloat(), itemRand.nextFloat() * 0.7F + 0.3F, false); } else { EntityLivingBase newMonster = null; try { newMonster = (EntityLivingBase) transformClass.getConstructor(new Class[]{World.class}).newInstance(new Object[]{target.worldObj}); } catch (Exception e) { e.printStackTrace(); } if (newMonster == null) { return false; } else { newMonster.setPositionAndRotation(target.posX, target.posY, target.posZ, target.rotationYaw, target.rotationPitch); target.worldObj.spawnEntityInWorld(newMonster); target.setDead(); } } --par1ItemStack.stackSize; return true; } else { return false; } } }
2,579
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinItemTFOreMagnet.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-TwilightForest/src/main/java/io/github/crucible/grimoire/mixins/twilightforest/MixinItemTFOreMagnet.java
package io.github.crucible.grimoire.mixins.twilightforest; import com.gamerforea.eventhelper.util.EventUtils; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.MathHelper; import net.minecraft.util.Vec3; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; import org.spongepowered.asm.mixin.Shadow; import twilightforest.item.ItemTF; import twilightforest.item.ItemTFOreMagnet; @Mixin(value = ItemTFOreMagnet.class, remap = false) public abstract class MixinItemTFOreMagnet extends ItemTF { /** * @author Rehab_CZ * @reason Fire events before magnet */ @Overwrite protected int doMagnet(World world, EntityPlayer player, float yawOffset, float pitchOffset) { double range = 32.0D; Vec3 srcVec = Vec3.createVectorHelper(player.posX, player.posY + player.getEyeHeight(), player.posZ); Vec3 lookVec = getOffsetLook(player, yawOffset, pitchOffset); Vec3 destVec = srcVec.addVector(lookVec.xCoord * range, lookVec.yCoord * range, lookVec.zCoord * range); int useX = MathHelper.floor_double(srcVec.xCoord); int useY = MathHelper.floor_double(srcVec.yCoord); int useZ = MathHelper.floor_double(srcVec.zCoord); int destX = MathHelper.floor_double(destVec.xCoord); int destY = MathHelper.floor_double(destVec.yCoord); int destZ = MathHelper.floor_double(destVec.zCoord); if (EventUtils.cantBreak(player, useX, useY, useZ) || EventUtils.cantBreak(player, destX, destY, destZ)){ return 1; //Needs to return 1 to stop the process! } return doMagnet(world, useX, useY, useZ, destX, destY, destZ); } @Shadow public static int doMagnet(World world, int useX, int useY, int useZ, int destX, int destY, int destZ) { return 0; } @Shadow protected abstract Vec3 getOffsetLook(EntityPlayer player, float yawOffset, float pitchOffset); }
2,015
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinItemTFCrumbleHorn.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-TwilightForest/src/main/java/io/github/crucible/grimoire/mixins/twilightforest/MixinItemTFCrumbleHorn.java
package io.github.crucible.grimoire.mixins.twilightforest; import com.gamerforea.eventhelper.util.EventUtils; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.Vec3; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; import org.spongepowered.asm.mixin.Shadow; import twilightforest.block.TFBlocks; import twilightforest.item.ItemTF; import twilightforest.item.ItemTFCrumbleHorn; @Mixin(value = ItemTFCrumbleHorn.class, remap = false) public abstract class MixinItemTFCrumbleHorn extends ItemTF { @Shadow @Final private static int CHANCE_HARVEST; @Shadow @Final private static int CHANCE_CRUMBLE; @Shadow protected abstract int crumbleBlocksInAABB(World world, EntityPlayer player, AxisAlignedBB par1AxisAlignedBB); /** * @author Rehab_CZ * @reason Fire events before crumble */ @Overwrite private int doCrumble(World world, EntityPlayer player) { if (EventUtils.cantBreak(player, player.posX, player.posY, player.posZ)) { return 0; //Stop crumble if can't break at its own location } double range = 3.0D; double radius = 2.0D; Vec3 srcVec = Vec3.createVectorHelper(player.posX, player.posY + player.getEyeHeight(), player.posZ); Vec3 lookVec = player.getLookVec(); Vec3 destVec = srcVec.addVector(lookVec.xCoord * range, lookVec.yCoord * range, lookVec.zCoord * range); AxisAlignedBB crumbleBox = AxisAlignedBB.getBoundingBox(destVec.xCoord - radius, destVec.yCoord - radius, destVec.zCoord - radius, destVec.xCoord + radius, destVec.yCoord + radius, destVec.zCoord + radius); return crumbleBlocksInAABB(world, player, crumbleBox); } /** * @author Rehab_CZ * @reason Fire events before crumble */ @Overwrite private int crumbleBlock(World world, EntityPlayer player, int dx, int dy, int dz) { int cost = 0; Block currentID = world.getBlock(dx, dy, dz); if (EventUtils.cantBreak(player, dx, dy, dz)) { return 0; } if (currentID != Blocks.air) { int currentMeta = world.getBlockMetadata(dx, dy, dz); if (currentID == Blocks.stone && world.rand.nextInt(CHANCE_CRUMBLE) == 0) { world.setBlock(dx, dy, dz, Blocks.cobblestone, 0, 3); world.playAuxSFX(2001, dx, dy, dz, Block.getIdFromBlock(currentID) + (currentMeta << 12)); cost++; } if (currentID == Blocks.stonebrick && currentMeta == 0 && world.rand.nextInt(CHANCE_CRUMBLE) == 0) { world.setBlock(dx, dy, dz, Blocks.stonebrick, 2, 3); world.playAuxSFX(2001, dx, dy, dz, Block.getIdFromBlock(currentID) + (currentMeta << 12)); cost++; } if (currentID == TFBlocks.mazestone && currentMeta == 1 && world.rand.nextInt(CHANCE_CRUMBLE) == 0) { world.setBlock(dx, dy, dz, TFBlocks.mazestone, 4, 3); world.playAuxSFX(2001, dx, dy, dz, Block.getIdFromBlock(currentID) + (currentMeta << 12)); cost++; } if (currentID == Blocks.cobblestone && world.rand.nextInt(CHANCE_CRUMBLE) == 0) { world.setBlock(dx, dy, dz, Blocks.gravel, 0, 3); world.playAuxSFX(2001, dx, dy, dz, Block.getIdFromBlock(currentID) + (currentMeta << 12)); cost++; } if (currentID == Blocks.gravel || currentID == Blocks.dirt) { if (currentID.canHarvestBlock(player, currentMeta) && world.rand.nextInt(CHANCE_HARVEST) == 0) { world.setBlock(dx, dy, dz, Blocks.air, 0, 3); currentID.harvestBlock(world, player, dx, dy, dz, currentMeta); world.playAuxSFX(2001, dx, dy, dz, Block.getIdFromBlock(currentID) + (currentMeta << 12)); cost++; } } } return cost; } }
4,214
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinEntityTFMoonwormShot.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-TwilightForest/src/main/java/io/github/crucible/grimoire/mixins/twilightforest/entity/MixinEntityTFMoonwormShot.java
package io.github.crucible.grimoire.mixins.twilightforest.entity; import com.gamerforea.eventhelper.util.EventUtils; import net.minecraft.block.Block; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.projectile.EntityThrowable; import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.MovingObjectPosition.MovingObjectType; import net.minecraftforge.common.util.FakePlayer; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; import twilightforest.block.TFBlocks; import twilightforest.entity.EntityTFMoonwormShot; import twilightforest.item.TFItems; @Mixin(value = EntityTFMoonwormShot.class, remap = false) public abstract class MixinEntityTFMoonwormShot extends EntityThrowable { public MixinEntityTFMoonwormShot(String someRandom) { super(null); throw new RuntimeException("This should never run!"); } /** * @author Rehab_CZ * @reason Check player instance and fire events */ @Overwrite protected void onImpact(MovingObjectPosition mop) { EntityLivingBase thrower = this.getThrower(); if (thrower == null || !(thrower instanceof EntityPlayerMP) || thrower instanceof FakePlayer) { return; } if (EventUtils.cantBreak((EntityPlayer) thrower, mop.blockX, mop.blockY, mop.blockZ)) { return; } if (mop.typeOfHit == MovingObjectType.BLOCK) { if (!worldObj.isRemote) { TFItems.moonwormQueen.onItemUse(null, (EntityPlayer) this.getThrower(), this.worldObj, mop.blockX, mop.blockY, mop.blockZ, mop.sideHit, 0, 0, 0); } } if (mop.entityHit != null) { mop.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), 0); } for (int var3 = 0; var3 < 8; ++var3) { this.worldObj.spawnParticle("blockcrack_" + Block.getIdFromBlock(TFBlocks.moonworm) + "_0", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D); } if (!this.worldObj.isRemote) { this.setDead(); } } }
2,268
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinEntityTFIceBomb.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-TwilightForest/src/main/java/io/github/crucible/grimoire/mixins/twilightforest/entity/MixinEntityTFIceBomb.java
package io.github.crucible.grimoire.mixins.twilightforest.entity; import com.gamerforea.eventhelper.util.EventUtils; import net.minecraft.block.material.Material; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.projectile.EntityThrowable; import net.minecraft.init.Blocks; import net.minecraftforge.common.util.FakePlayer; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; import twilightforest.entity.boss.EntityTFIceBomb; @Mixin (value = EntityTFIceBomb.class, remap = false) public abstract class MixinEntityTFIceBomb extends EntityThrowable { public MixinEntityTFIceBomb(String someRandom) { super(null); throw new RuntimeException("This should never run!"); } /** * @author Rehab_CZ * @reason Check player instance and fire events */ @Overwrite private void doTerrainEffect(int x, int y, int z) { EntityLivingBase thrower = this.getThrower(); if ( thrower == null || !(thrower instanceof EntityPlayerMP) || thrower instanceof FakePlayer){ return; } EntityPlayerMP playerMP = (EntityPlayerMP) thrower; if (EventUtils.cantBreak(playerMP, x, y, z)){ return; } if (this.worldObj.getBlock(x, y, z).getMaterial() == Material.water) { this.worldObj.setBlock(x, y, z, Blocks.ice); } if (this.worldObj.getBlock(x, y, z).getMaterial() == Material.lava) { this.worldObj.setBlock(x, y, z, Blocks.obsidian); } if (this.worldObj.isAirBlock(x, y, z) && Blocks.snow_layer.canPlaceBlockAt(this.worldObj, x, y, z)) { this.worldObj.setBlock(x, y, z, Blocks.snow_layer); } } }
1,796
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
MixinEntityCustomDragon.java
/FileExtraction/Java_unseen/CrucibleMC_Grimoire-Mixins-1_7_10/Mixin-DraconicEvolution/src/main/java/io/github/crucible/grimoire/mixins/draconicevolution/MixinEntityCustomDragon.java
package io.github.crucible.grimoire.mixins.draconicevolution; import com.brandon3055.draconicevolution.common.entity.EntityCustomDragon; import com.brandon3055.draconicevolution.common.handler.ConfigHandler; import com.brandon3055.draconicevolution.common.utills.LogHelper; import net.minecraft.block.BlockEndPortal; import net.minecraft.entity.boss.EntityDragon; import net.minecraft.init.Blocks; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; import org.spongepowered.asm.mixin.Shadow; import java.lang.reflect.Method; //Faz o dragão disparar o evento de criação do portal. @Mixin(value = EntityCustomDragon.class, remap = false) public abstract class MixinEntityCustomDragon extends EntityDragon { @Shadow public int portalX = 0; @Shadow public int portalY = 67; @Shadow public int portalZ = 0; @Shadow protected boolean isUber = false; @Shadow private final boolean createPortal = true; public MixinEntityCustomDragon(World p_i1700_1_) { super(p_i1700_1_); } /** * @author juanmuscaria * @reason Fazer o Ender Dragon do draconic disparar o mesmo evento do dragão normal. */ @Overwrite private void spawnEgg() { if (ConfigHandler.dragonEggSpawnLocation[0] != 0 || ConfigHandler.dragonEggSpawnLocation[1] != 0 || ConfigHandler.dragonEggSpawnLocation[1] != 0 && !isUber) { portalX = ConfigHandler.dragonEggSpawnLocation[0]; portalY = ConfigHandler.dragonEggSpawnLocation[1]; portalZ = ConfigHandler.dragonEggSpawnLocation[2]; } BlockEndPortal.field_149948_a = true; if (createPortal || isUber) { createPortal(portalX, portalZ); } LogHelper.info("spawn egg"); if (worldObj.getBlock(portalX, portalY + 1, portalZ) == Blocks.air) { worldObj.setBlock(portalX, portalY + 1, portalZ, Blocks.dragon_egg); LogHelper.info("spawn egg2 " + portalX + " " + portalY + " " + portalZ); } else { for (int i = portalY + 1; i < 250; i++) { if (worldObj.getBlock(portalX, i, portalZ) == Blocks.air) { worldObj.setBlock(portalX, i, portalZ, Blocks.dragon_egg); LogHelper.info("spawn egg3"); break; } } } for (int iX = portalX - 2; iX <= portalX + 2; iX++) { for (int iZ = portalZ - 2; iZ <= portalZ + 2; iZ++) { if (worldObj.getBlock(iX, portalY - 4, iZ) == Blocks.bedrock && !(iX == portalX && iZ == portalZ)) { worldObj.setBlock(iX, portalY - 3, iZ, Blocks.end_portal); } } } worldObj.setBlock(portalX - 1, portalY - 1, portalZ, Blocks.torch); worldObj.setBlock(portalX + 1, portalY - 1, portalZ, Blocks.torch); worldObj.setBlock(portalX, portalY - 1, portalZ - 1, Blocks.torch); worldObj.setBlock(portalX, portalY - 1, portalZ + 1, Blocks.torch); BlockEndPortal.field_149948_a = false; } private void createPortal(int portalX, int portalZ) { try { @SuppressWarnings("JavaReflectionMemberAccess") //Existe no runtime, bruxaria do thermos. Method method = EntityDragon.class.getMethod("func_70975_a", int.class, int.class); method.invoke(this, portalX, portalZ); } catch (Exception e) { e.printStackTrace(); } } }
3,558
Java
.java
CrucibleMC/Grimoire-Mixins-1.7.10
13
7
3
2019-11-30T22:53:46Z
2023-04-23T21:30:00Z
package-info.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/package-info.java
@ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault @FieldsAreNonnullByDefault package untamedwilds; import com.mojang.blaze3d.FieldsAreNonnullByDefault; import com.mojang.blaze3d.MethodsReturnNonnullByDefault; import javax.annotation.ParametersAreNonnullByDefault;
276
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
UntamedWilds.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/UntamedWilds.java
package untamedwilds; import net.minecraft.world.level.block.DispenserBlock; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.fml.ModLoadingContext; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.config.ModConfig; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import net.minecraftforge.fml.loading.FMLPaths; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import untamedwilds.block.CageBlock; import untamedwilds.compat.CompatBridge; import untamedwilds.config.ConfigBase; import untamedwilds.init.*; import untamedwilds.network.UntamedInstance; import untamedwilds.world.UntamedWildsGenerator; @Mod(value = UntamedWilds.MOD_ID) public class UntamedWilds { // TODO: Abstract Herd logic to be functional with any LivingEntity (instead of being limited to IPackEntity ComplexMob) // TODO: Store the children's UUID in their mother's NBT, to allow checking for Children without constant AABB checking // TODO: Have carnivorous mobs gain hunger when attacking // TODO: Move Variants from Int to String to prevent shuffling? // TODO: Gillie suit bauble, to prevent animals from spotting you public static final Logger LOGGER = LogManager.getLogger(); public static final String MOD_ID = "untamedwilds"; public static final boolean DEBUG = false; public UntamedWilds() { final IEventBus eventBus = FMLJavaModLoadingContext.get().getModEventBus(); ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, ConfigBase.common_config); ConfigBase.loadConfig(ConfigBase.common_config, FMLPaths.CONFIGDIR.get().resolve("untamedwilds-common.toml").toString()); eventBus.addListener(this::setupCommon); eventBus.addListener(this::setupClient); ModBlock.BLOCKS.register(eventBus); ModBlock.TILE_ENTITIES.register(eventBus); ModItems.ITEMS.register(eventBus); ModEntity.ENTITIES.register(eventBus); ModItems.registerSpawnItems(); ModSounds.SOUNDS.register(eventBus); ModAdvancementTriggers.register(); UntamedWildsGenerator.FEATURES.register(eventBus); UntamedWildsGenerator.CONFIGURED_FEATURES.register(eventBus); UntamedWildsGenerator.PLACED_FEATURES.register(eventBus); CompatBridge.RegisterCompat(); UntamedWildsGenerator.readBioDiversityLevels(); } private void setupCommon(final FMLCommonSetupEvent event) { UntamedInstance.registerMessages(); DispenserBlock.registerBehavior(ModBlock.TRAP_CAGE.get().asItem(), new CageBlock.DispenserBehaviorTrapCage()); } private void setupClient(final FMLClientSetupEvent event) { ModBlock.registerRendering(); ModBlock.registerBlockColors(); //ModBlock.registerBlockColors(); //ModParticles.registerParticles(); Handled through events } }
3,061
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
ConfigModCompat.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/config/ConfigModCompat.java
package untamedwilds.config; import net.minecraftforge.common.ForgeConfigSpec; public class ConfigModCompat { public static ForgeConfigSpec.BooleanValue sereneSeasonsCompat; ConfigModCompat(final ForgeConfigSpec.Builder builder) { builder.comment("Inter-mod compatibility"); sereneSeasonsCompat = builder.comment("Controls whether to check for Serene Seasons for compatibility (Mobs will only breed during specific seasons).").define("modcompat.serene_seasons", true); } }
507
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
ConfigGamerules.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/config/ConfigGamerules.java
package untamedwilds.config; import net.minecraftforge.common.ForgeConfigSpec; public class ConfigGamerules { public static ForgeConfigSpec.BooleanValue naturalBreeding; public static ForgeConfigSpec.BooleanValue hardcoreBreeding; public static ForgeConfigSpec.BooleanValue easyBreeding; public static ForgeConfigSpec.BooleanValue genderedBreeding; public static ForgeConfigSpec.BooleanValue hardcoreDeath; public static ForgeConfigSpec.BooleanValue playerBreeding; public static ForgeConfigSpec.BooleanValue randomSpecies; public static ForgeConfigSpec.BooleanValue scientificNames; public static ForgeConfigSpec.BooleanValue grazerGriefing; public static ForgeConfigSpec.BooleanValue mobGriefing; public static ForgeConfigSpec.BooleanValue angrySleepers; public static ForgeConfigSpec.BooleanValue contactAgression; public static ForgeConfigSpec.BooleanValue mobsLayEggs; public static ForgeConfigSpec.BooleanValue spyglassBehaviorChange; public static ForgeConfigSpec.IntValue spyglassCheckRange; public static ForgeConfigSpec.BooleanValue sleepBehaviour; public static ForgeConfigSpec.BooleanValue easyMobCapturing; public static ForgeConfigSpec.IntValue cycleLength; public static ForgeConfigSpec.DoubleValue rareSkinChance; public static ForgeConfigSpec.BooleanValue wildRareSkins; public static ForgeConfigSpec.BooleanValue attackUndead; ConfigGamerules(final ForgeConfigSpec.Builder builder) { builder.comment("Options pertaining to global Gamerules"); naturalBreeding = builder.comment("Defines whether animals should breed without Player intervention.").define("gamerules.natural_breeding", true); hardcoreBreeding = builder.comment("Adds additional restrictions to mob breeding, including Biome/Temperature requirements and Overcrowding.").define("gamerules.hardcore_breeding", false); easyBreeding = builder.comment("Pregnancy time is only used as a cooldown, babies pop out instantly like in Vanilla.").define("gamerules.easy_breeding", false); genderedBreeding = builder.comment("Whether breeding requires a Male and a Female to produce offspring/eggs. (Warning: may lead to uncontrolled spawns of eggs)").define("gamerules.gendered_breeding", true); playerBreeding = builder.comment("Defines whether players can trigger breeding by feeding a creature's favourite item, like in vanilla.").define("gamerules.player_breeding", false); randomSpecies = builder.comment("Allows mobs to spawn as fully random species, ignoring Biomes and Rarity.").define("gamerules.random_species", false); rareSkinChance = builder.comment("Chance for a mob, out of 1, to have it's Skin replaced by a Rare skin (if any are defined through assets)").defineInRange("gamerules.rare_skin_chance", 0.05, 0, 1); wildRareSkins = builder.comment("Should mobs with Rare skins generate in the wild (if defined through assets)").define("gamerules.wild_rare_skins", true); spyglassBehaviorChange = builder.comment("Should the vanilla Spyglass display information when a player looks at a mob. Set to false to disable.").define("gamerules.spyglass_behavior_change", true); spyglassCheckRange = builder.comment("Range up to which the Spyglass will identify mobs and give information, this length is not in blocks, and is roughly equivalent to a Render distance of 12.").defineInRange("gamerules.spyglass_range", 5000, 0, Integer.MAX_VALUE); hardcoreDeath = builder.comment("Disable this option to have tamed mobs respawn in their home with half a Heart if they were to 'die' (IMPORTANT: This gamerule is NOT fully functional and using it as a free get-out-of-jail card is bound to be disappointing, use at your own risk).").define("gamerules.hardcore_death", true); scientificNames = builder.comment("Features scientific names in various descriptions (eg. for mobs inside Cage Traps).").define("gamerules.scientific_names", true); grazerGriefing = builder.comment("Should 'Grazing' mobs destroy Tall Grass and/or turn Grass into dirt blocks (like Vanilla Sheep do).").define("gamerules.grazer_griefing", true); mobGriefing = builder.comment("Should mobs potentially destroy the terrain? Keep in mind 'mobGriefing' is still required").define("gamerules.mob_griefing", false); mobsLayEggs = builder.comment("If set to false, prevents mobs from dropping eggs").define("gamerules.mobs_drop_eggs", false); angrySleepers = builder.comment("Defines whether certain large predators will be angered if a player approaches them while they are sleeping.").define("gamerules.angry_sleepers", true); contactAgression = builder.comment("Defines whether certain critters will become angry if a mob/player 'steps' on them, by coming too close.").define("gamerules.contact_agression", true); attackUndead = builder.comment("Defines whether animals should actively target and hunt Undead mobs. Disabling this option should make mobs less prone to dying due to angering a Zombie horde").define("gamerules.attack_undead", true); sleepBehaviour = builder.comment("Should the 'Sleeping' behaviour run? Disabling this option also disables the activity").define("gamerules.mob_sleeping", true); easyMobCapturing = builder.comment("If set to false, makes mobs a lot harder to catch by preventing the capture of hostile mobs").define("gamerules.easy_mob_capture", true); cycleLength = builder.comment("Defines how long a cycle should last, cycles are used to scale the gestation and breeding periods", "Example values: 24000 - Day, 168000 - Week, 720000 - Month, 8760000 - Year").defineInRange("gamerules.cycle_length", 24000, 0, 8760000); } }
5,791
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
ConfigBase.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/config/ConfigBase.java
package untamedwilds.config; import com.electronwill.nightconfig.core.file.CommentedFileConfig; import com.electronwill.nightconfig.core.io.WritingMode; import net.minecraftforge.common.ForgeConfigSpec; import net.minecraftforge.fml.common.Mod; import untamedwilds.UntamedWilds; @Mod.EventBusSubscriber(modid = UntamedWilds.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD) public class ConfigBase { private static final ForgeConfigSpec.Builder common_builder = new ForgeConfigSpec.Builder(); public static final ForgeConfigSpec common_config; public static final ConfigFeatureControl FEATURES; public static final ConfigGamerules GAMERULES; public static final ConfigMobControl MOBS; public static final ConfigModCompat COMPAT; static { FEATURES = new ConfigFeatureControl(common_builder); GAMERULES = new ConfigGamerules(common_builder); MOBS = new ConfigMobControl(common_builder); COMPAT = new ConfigModCompat(common_builder); common_config = common_builder.build(); } public static void loadConfig(ForgeConfigSpec config, String path) { final CommentedFileConfig configData = CommentedFileConfig.builder(path).sync().autosave().writingMode(WritingMode.REPLACE).build(); configData.load(); config.setConfig(configData); } }
1,334
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
ConfigFeatureControl.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/config/ConfigFeatureControl.java
package untamedwilds.config; import com.google.common.collect.Lists; import net.minecraftforge.common.ForgeConfigSpec; import java.util.Arrays; import java.util.List; public class ConfigFeatureControl { public static ForgeConfigSpec.BooleanValue addAnemones; public static ForgeConfigSpec.BooleanValue addReeds; public static ForgeConfigSpec.BooleanValue addFlora; public static ForgeConfigSpec.BooleanValue addAlgae; public static ForgeConfigSpec.BooleanValue addTreeOrchids; public static ForgeConfigSpec.BooleanValue addBurrows; public static ForgeConfigSpec.ConfigValue<List<? extends String>> reedBlacklist; public static ForgeConfigSpec.ConfigValue<List<? extends String>> floraBlacklist; public static ForgeConfigSpec.ConfigValue<List<? extends String>> algaeBlacklist; public static ForgeConfigSpec.IntValue freqReeds; public static ForgeConfigSpec.IntValue freqFlora; public static ForgeConfigSpec.IntValue freqAlgae; public static ForgeConfigSpec.IntValue freqCritter; public static ForgeConfigSpec.IntValue freqWater; public static ForgeConfigSpec.IntValue freqSessile; public static ForgeConfigSpec.IntValue freqOcean; public static ForgeConfigSpec.IntValue freqApex; public static ForgeConfigSpec.IntValue freqHerbivores; public static ForgeConfigSpec.IntValue probUnderground; public static ForgeConfigSpec.ConfigValue<List<? extends String>> dimensionFeatureBlacklist; ConfigFeatureControl(final ForgeConfigSpec.Builder builder) { //builder.push("feature_control"); builder.comment("Options pertaining to blocks and their world generation"); addAnemones = builder.comment("Controls whether to add Anemones and their associated items to oceans.").define("gencontrol.anemone", true); addReeds = builder.comment("Controls whether to spawn Reeds in River/Swamp biomes").define("gencontrol.reeds", true); addFlora = builder.comment("Controls whether to spawn random Flora in the world").define("gencontrol.bush", true); addTreeOrchids = builder.comment("Controls whether to add Tree Orchids (NOT YET IMPLEMENTED)").define("gencontrol.tree_orchid", true); addAlgae = builder.comment("Controls whether to spawn Amazon Sword in Swamp/Jungle biomes").define("gencontrol.algae", true); addBurrows = builder.comment("Controls whether to use Burrows to spawn Critters, if disabled, Critters will spawn in the world like normal mobs.").define("gencontrol.burrows", true); reedBlacklist = builder.comment("Prevent spawns of Reeds in these biomes").defineList("gencontrol.reed_blacklist", Lists.newArrayList(), string -> string instanceof String); freqReeds = builder.comment("Frequency of Reeds, 1 in N chunks will generate Reeds (0 to disable)").defineInRange("gencontrol.freqreeds", 4, 0, Integer.MAX_VALUE); floraBlacklist = builder.comment("Prevent spawns of Flora in these biomes").defineList("gencontrol.flora_blacklist", Lists.newArrayList(), string -> string instanceof String); freqFlora = builder.comment("Frequency of Flora, 1 in N chunks will generate random Flora (0 to disable)").defineInRange("gencontrol.freqflora", 4, 0, Integer.MAX_VALUE); algaeBlacklist = builder.comment("Prevent spawns of Algae in these biomes").defineList("gencontrol.algae_blacklist", Arrays.asList("minecraft:frozen_ocean","minecraft:deep_frozen_ocean"), string -> string instanceof String); freqAlgae = builder.comment("Frequency of Algae, abstract value (0 to disable)").defineInRange("gencontrol.freqalgae", 1, 0, Integer.MAX_VALUE); freqCritter = builder.comment("Frequency of Critters, 1 in N chunks will generate with Critters (0 to disable)").defineInRange("gencontrol.freqcritter", 6, 0, Integer.MAX_VALUE); freqSessile = builder.comment("Frequency of Sessile Ocean Mobs, 1 in N chunks will generate with Sessile Mobs (0 to disable)").defineInRange("gencontrol.freqsessile", 8, 0, Integer.MAX_VALUE); freqOcean = builder.comment("Frequency of Ocean Mobs, 1 in N chunks will generate with Ocean Mobs (0 to disable)").defineInRange("gencontrol.freqocean", 16, 0, Integer.MAX_VALUE); freqApex = builder.comment("Frequency of Apex Predators, 1 in N chunks will generate with an Apex Predator (0 to disable)").defineInRange("gencontrol.freqapex", 64, 0, Integer.MAX_VALUE); freqHerbivores = builder.comment("Frequency of Herbivores, 1 in N chunks will generate with an Apex Predator (0 to disable)").defineInRange("gencontrol.freqherbivore", 48, 0, Integer.MAX_VALUE); freqWater = builder.comment("Frequency of Freshwater Mobs, 1 in N chunks will generate with Freshwater Mobs (0 to disable)").defineInRange("gencontrol.freqwater", 8, 0, Integer.MAX_VALUE); probUnderground = builder.comment("Frequency of Underground mobs, N attempts to spawn a mob will be made on each chunk (0 to disable)").defineInRange("gencontrol.probunderground", 1, 0, Integer.MAX_VALUE); dimensionFeatureBlacklist = builder.comment("Prevent flora and other blocks (besides Burrows) from generating in the defined dimensions.").defineList("gencontrol.dimensionFeatureBlacklist", Lists.newArrayList(), string -> string instanceof String); //builder.pop(); } }
5,313
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
ConfigMobControl.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/config/ConfigMobControl.java
package untamedwilds.config; import com.google.common.collect.Lists; import net.minecraftforge.common.ForgeConfigSpec; import java.util.List; public class ConfigMobControl { public static ForgeConfigSpec.IntValue critterSpawnRange; public static ForgeConfigSpec.IntValue burrowRepopulationChance; public static ForgeConfigSpec.IntValue treeSpawnBias; public static ForgeConfigSpec.BooleanValue masterSpawner; public static ForgeConfigSpec.BooleanValue tickingNests; public static ForgeConfigSpec.ConfigValue<List<? extends String>> dimensionBlacklist; ConfigMobControl(final ForgeConfigSpec.Builder builder) { builder.comment("Pest Control"); masterSpawner = builder.comment("This toggle can used to fully disable the spawning of all UntamedWilds entities, giving flexibility if somebody chooses to use alternative mob spawning methods.").define("mobcontrol.masterspawner", true); critterSpawnRange = builder.comment("Critters further than this value from any Player will despawn into their Burrow (only if they have a Burrow assigned).").defineInRange("mobcontrol.critterSpawnRange", 40, 0, Integer.MAX_VALUE); burrowRepopulationChance = builder.comment("Chance, defined as once every N tries, where N is this value, for a new mob to be generated when a burrow spawns a new mob.").defineInRange("mobcontrol.burrowRepopulationChance", 10, 0, 100); tickingNests = builder.comment("Defines whether baby mobs occasionally spawn from nests without player intervention.").define("mobcontrol.tickingNests", true); treeSpawnBias = builder.comment("If a mob were to be unable to spawn on the ground (due to terrain collisions), check again N blocks above the floor, where N is this value. Set to 0 to disable, higher values will mean mobs spawning on top of taller trees").defineInRange("mobcontrol.treeSpawnBias", 4, 0, 256); dimensionBlacklist = builder.comment("Prevent mobs and burrows from spawning in the defined dimensions.").defineList("mobcontrol.dimensionBlacklist", Lists.newArrayList(), string -> string instanceof String); } }
2,128
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
ChumParticle.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/particle/ChumParticle.java
package untamedwilds.client.particle; import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.client.particle.*; import net.minecraft.core.particles.SimpleParticleType; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @OnlyIn(Dist.CLIENT) public class ChumParticle extends RisingParticle { private final SpriteSet spriteWithAge; private ChumParticle(ClientLevel world, double x, double y, double z, double motionX, double motionY, double motionZ, SpriteSet spriteWithAge) { super(world, x, y, z, motionX, Math.abs(motionY) * -1, motionZ); this.spriteWithAge = spriteWithAge; this.lifetime = this.random.nextInt(80) + 120; this.setSpriteFromAge(spriteWithAge); } public ParticleRenderType getRenderType() { return ParticleRenderType.PARTICLE_SHEET_TRANSLUCENT; } public void tick() { super.tick(); this.setSpriteFromAge(this.spriteWithAge); /*if (!this.isExpired) { this.selectSpriteWithAge(this.spriteWithAge); }*/ } /*public int getBrightnessForRender(float partialTick) { int i = super.getBrightnessForRender(partialTick); float f = (float)this.age / (float)this.lifetime; f = f * f; f = f * f; int j = i & 255; int k = i >> 16 & 255; k = k + (int)(f * 15.0F * 16.0F); if (k > 240) { k = 240; } return j | k << 16; }*/ public float getScale(float scaleFactor) { float f = 0.6F + ((float)this.age + scaleFactor) / (float)this.lifetime; return this.quadSize * (1.0F + f * f * 0.5F); } @OnlyIn(Dist.CLIENT) public static class Provider implements ParticleProvider<SimpleParticleType> { private final SpriteSet spriteSet; public Provider(SpriteSet spriteSet) { this.spriteSet = spriteSet; } public Particle createParticle(SimpleParticleType typeIn, ClientLevel worldIn, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { ChumParticle soulparticle = new ChumParticle(worldIn, x, y, z, xSpeed, ySpeed, zSpeed, this.spriteSet); soulparticle.setAlpha(0.8F); return soulparticle; } } }
2,316
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
LayerFootballFishLure.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/layer/LayerFootballFishLure.java
package untamedwilds.client.layer; import net.minecraft.client.model.EntityModel; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.entity.RenderLayerParent; import net.minecraft.client.renderer.entity.layers.EyesLayer; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.Entity; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import untamedwilds.UntamedWilds; @OnlyIn(Dist.CLIENT) public class LayerFootballFishLure<T extends Entity, M extends EntityModel<T>> extends EyesLayer<T, M> { private final RenderType TEXTURE = RenderType.eyes(new ResourceLocation(UntamedWilds.MOD_ID, "textures/entity/football_fish/glint.png")); public LayerFootballFishLure(RenderLayerParent<T, M> rendererIn) { super(rendererIn); } public RenderType renderType() { return TEXTURE; } }
923
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererProjectileSpit.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererProjectileSpit.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; import com.mojang.math.Vector3f; import net.minecraft.client.model.LlamaSpitModel; import net.minecraft.client.model.geom.ModelLayers; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.entity.EntityRenderer; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.Mth; import net.minecraft.world.entity.projectile.LlamaSpit; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import untamedwilds.client.model.ModelProjectileSpit; import untamedwilds.entity.ProjectileSpit; @OnlyIn(Dist.CLIENT) public class RendererProjectileSpit extends EntityRenderer<ProjectileSpit> { private static final ResourceLocation LLAMA_SPIT_LOCATION = new ResourceLocation("textures/entity/llama/spit.png"); private final ModelProjectileSpit<ProjectileSpit> model; public RendererProjectileSpit(EntityRendererProvider.Context p_174296_) { super(p_174296_); this.model = new ModelProjectileSpit<>(p_174296_.bakeLayer(ModelLayers.LLAMA_SPIT)); } public void render(ProjectileSpit p_115373_, float p_115374_, float p_115375_, PoseStack p_115376_, MultiBufferSource p_115377_, int p_115378_) { p_115376_.pushPose(); p_115376_.translate(0.0D, (double)0.15F, 0.0D); p_115376_.mulPose(Vector3f.YP.rotationDegrees(Mth.lerp(p_115375_, p_115373_.yRotO, p_115373_.getYRot()) - 90.0F)); p_115376_.mulPose(Vector3f.ZP.rotationDegrees(Mth.lerp(p_115375_, p_115373_.xRotO, p_115373_.getXRot()))); this.model.setupAnim(p_115373_, p_115375_, 0.0F, -0.1F, 0.0F, 0.0F); VertexConsumer vertexconsumer = p_115377_.getBuffer(this.model.renderType(LLAMA_SPIT_LOCATION)); this.model.renderToBuffer(p_115376_, vertexconsumer, p_115378_, OverlayTexture.NO_OVERLAY, 1.0F, 1.0F, 1.0F, 1.0F); p_115376_.popPose(); super.render(p_115373_, p_115374_, p_115375_, p_115376_, p_115377_, p_115378_); } public ResourceLocation getTextureLocation(ProjectileSpit p_115371_) { return LLAMA_SPIT_LOCATION; } }
2,346
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererBigCat.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererBigCat.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.client.model.EntityModel; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelBigCat; import untamedwilds.client.model.ModelBigCatCub; import untamedwilds.entity.mammal.EntityBigCat; public class RendererBigCat extends MobRenderer<EntityBigCat, EntityModel<EntityBigCat>> { private static final ModelBigCat BIG_CAT_MODEL = new ModelBigCat(); private static final ModelBigCatCub BIG_CAT_MODEL_CUB = new ModelBigCatCub(); public RendererBigCat(EntityRendererProvider.Context renderManager) { super(renderManager, BIG_CAT_MODEL, 1F); } @Override public void render(EntityBigCat entityIn, float entityYaw, float partialTicks, PoseStack matrixStackIn, MultiBufferSource bufferIn, int packedLightIn) { if (entityIn.isBaby()) { model = BIG_CAT_MODEL_CUB; } else { model = BIG_CAT_MODEL; } super.render(entityIn, entityYaw, partialTicks, matrixStackIn, bufferIn, packedLightIn); } protected void scale(EntityBigCat entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize(); //f *= entity.getScale(); matrixStackIn.scale(f, f, f); this.shadowRadius = f; } @Override public @NotNull ResourceLocation getTextureLocation(EntityBigCat entity) { return entity.getTexture(); } }
1,712
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererHyena.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererHyena.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.client.model.EntityModel; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelHyena; import untamedwilds.client.model.ModelRhinoCalf; import untamedwilds.entity.mammal.EntityHyena; import javax.annotation.Nonnull; public class RendererHyena extends MobRenderer<EntityHyena, EntityModel<EntityHyena>> { private static final ModelHyena HYENA_MODEL = new ModelHyena(); public RendererHyena(EntityRendererProvider.Context renderManager) { super(renderManager, HYENA_MODEL, 1F); } /*@Override public void render(EntityHyena entityIn, float entityYaw, float partialTicks, PoseStack matrixStackIn, MultiBufferSource bufferIn, int packedLightIn) { if (entityIn.isBaby()) { model = HYENA_MODEL; } else { model = HYENA_MODEL; } super.render(entityIn, entityYaw, partialTicks, matrixStackIn, bufferIn, packedLightIn); }*/ protected void scale(EntityHyena entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize(); f *= entity.getScale(); matrixStackIn.scale(f, f, f); this.shadowRadius = f * 0.6F; } public @NotNull ResourceLocation getTextureLocation(EntityHyena entity) { return entity.getTexture(); } }
1,580
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererCatfish.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererCatfish.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.model.EntityModel; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelCatfish; import untamedwilds.entity.fish.EntityCatfish; public class RendererCatfish extends MobRenderer<EntityCatfish, EntityModel<EntityCatfish>> { private static final ModelCatfish TREVALLY_MODEL = new ModelCatfish(); public RendererCatfish(EntityRendererProvider.Context rendermanager) { super(rendermanager, TREVALLY_MODEL, 0.2F); } @Override protected void scale(EntityCatfish entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize() * 0.8F; f *= entity.getScale(); matrixStackIn.scale(f, f, f); this.shadowRadius = f * 0.5F; } public @NotNull ResourceLocation getTextureLocation(EntityCatfish entity) { return entity.getTexture(); } }
1,140
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererHippo.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererHippo.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.client.model.EntityModel; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelHippo; import untamedwilds.client.model.ModelHippoCalf; import untamedwilds.entity.mammal.EntityHippo; import javax.annotation.Nonnull; public class RendererHippo extends MobRenderer<EntityHippo, EntityModel<EntityHippo>> { private static final ModelHippo HIPPO_MODEL = new ModelHippo(); private static final ModelHippoCalf HIPPO_MODEL_CALF = new ModelHippoCalf(); public RendererHippo(EntityRendererProvider.Context renderManager) { super(renderManager, HIPPO_MODEL, 1F); } @Override public void render(EntityHippo entityIn, float entityYaw, float partialTicks, PoseStack matrixStackIn, MultiBufferSource bufferIn, int packedLightIn) { if (entityIn.isBaby()) { model = HIPPO_MODEL_CALF; } else { model = HIPPO_MODEL; } super.render(entityIn, entityYaw, partialTicks, matrixStackIn, bufferIn, packedLightIn); } protected void scale(EntityHippo entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize(); //f *= entity.getScale(); matrixStackIn.scale(f, f, f); this.shadowRadius = f; } public @NotNull ResourceLocation getTextureLocation(EntityHippo entity) { return entity.getTexture(); } }
1,713
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererOpossum.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererOpossum.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.model.EntityModel; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelOpossum; import untamedwilds.entity.mammal.EntityOpossum; public class RendererOpossum extends MobRenderer<EntityOpossum, EntityModel<EntityOpossum>> { private static final ModelOpossum OPOSSUM_MODEL = new ModelOpossum(); public RendererOpossum(EntityRendererProvider.Context renderManager) { super(renderManager, OPOSSUM_MODEL, 0.4F); } @Override public void render(EntityOpossum entityIn, float entityYaw, float partialTicks, PoseStack matrixStackIn, MultiBufferSource bufferIn, int packedLightIn) { model = OPOSSUM_MODEL; super.render(entityIn, entityYaw, partialTicks, matrixStackIn, bufferIn, packedLightIn); } protected void scale(EntityOpossum entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize(); f *= entity.getScale(); matrixStackIn.scale(f, f, f); this.shadowRadius = f * 0.4F; } public @NotNull ResourceLocation getTextureLocation(EntityOpossum entity) { return entity.getTexture(); } }
1,482
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererSunfish.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererSunfish.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.client.model.EntityModel; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelSunfish; import untamedwilds.entity.fish.EntitySunfish; import javax.annotation.Nonnull; public class RendererSunfish extends MobRenderer<EntitySunfish, EntityModel<EntitySunfish>> { private static final ModelSunfish SUNFISH_MODEL = new ModelSunfish(); public RendererSunfish(EntityRendererProvider.Context rendermanager) { super(rendermanager, SUNFISH_MODEL, 1F); } protected void scale(EntitySunfish entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize(); f *= entity.getScale(); matrixStackIn.scale(f, f, f); this.shadowRadius = f; } public @NotNull ResourceLocation getTextureLocation(EntitySunfish entity) { return entity.getTexture(); } }
1,142
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererTriggerfish.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererTriggerfish.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.client.model.EntityModel; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelTriggerfish; import untamedwilds.entity.fish.EntityTriggerfish; import javax.annotation.Nonnull; public class RendererTriggerfish extends MobRenderer<EntityTriggerfish, EntityModel<EntityTriggerfish>> { private static final ModelTriggerfish TRIGGERFISH_MODEL = new ModelTriggerfish(); public RendererTriggerfish(EntityRendererProvider.Context rendermanager) { super(rendermanager, TRIGGERFISH_MODEL, 0.2F); } @Override protected void scale(EntityTriggerfish entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize() * 0.8F; f *= entity.getScale(); matrixStackIn.scale(f, f, f * 1.1F); this.shadowRadius = f * 0.5F; } public @NotNull ResourceLocation getTextureLocation(EntityTriggerfish entity) { return entity.getTexture(); } }
1,227
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererAardvark.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererAardvark.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.model.EntityModel; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelAardvark; import untamedwilds.entity.mammal.EntityAardvark; public class RendererAardvark extends MobRenderer<EntityAardvark, EntityModel<EntityAardvark>> { private static final ModelAardvark AARDVARK_MODEL = new ModelAardvark(); public RendererAardvark(EntityRendererProvider.Context renderManager) { super(renderManager, AARDVARK_MODEL, 0.4F); } @Override public void render(EntityAardvark entityIn, float entityYaw, float partialTicks, PoseStack matrixStackIn, MultiBufferSource bufferIn, int packedLightIn) { model = AARDVARK_MODEL; super.render(entityIn, entityYaw, partialTicks, matrixStackIn, bufferIn, packedLightIn); } protected void scale(EntityAardvark entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize(); f *= entity.getScale(); matrixStackIn.scale(f, f, f); this.shadowRadius = f * 0.6F; } public @NotNull ResourceLocation getTextureLocation(EntityAardvark entity) { return entity.getTexture(); } }
1,496
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererWhaleShark.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererWhaleShark.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.client.model.EntityModel; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelWhaleShark; import untamedwilds.entity.fish.EntityWhaleShark; public class RendererWhaleShark extends MobRenderer<EntityWhaleShark, EntityModel<EntityWhaleShark>> { private static final ModelWhaleShark SHARK_MODEL = new ModelWhaleShark(); public RendererWhaleShark(EntityRendererProvider.Context rendermanager) { super(rendermanager, SHARK_MODEL, 0.2F); } @Override protected void scale(EntityWhaleShark entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize(); f *= entity.getScale(); matrixStackIn.scale(f, f, f); this.shadowRadius = f; } public @NotNull ResourceLocation getTextureLocation(EntityWhaleShark entity) { return entity.getTexture(); } }
1,149
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererTrevally.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererTrevally.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.client.model.EntityModel; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelTrevally; import untamedwilds.entity.fish.EntityTrevally; import javax.annotation.Nonnull; public class RendererTrevally extends MobRenderer<EntityTrevally, EntityModel<EntityTrevally>> { private static final ModelTrevally TREVALLY_MODEL = new ModelTrevally(); public RendererTrevally(EntityRendererProvider.Context rendermanager) { super(rendermanager, TREVALLY_MODEL, 0.2F); } @Override protected void scale(EntityTrevally entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize() * 0.8F; f *= entity.getScale(); matrixStackIn.scale(f, f, f); this.shadowRadius = f * 0.5F; } public @NotNull ResourceLocation getTextureLocation(EntityTrevally entity) { return entity.getTexture(); } }
1,183
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererKingCrab.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererKingCrab.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelKingCrab; import untamedwilds.entity.arthropod.EntityKingCrab; public class RendererKingCrab extends MobRenderer<EntityKingCrab, ModelKingCrab> { private static final ModelKingCrab KING_CRAB_MODEL = new ModelKingCrab(); public RendererKingCrab(EntityRendererProvider.Context renderManager) { super(renderManager, KING_CRAB_MODEL, 0.2F); } @Override protected void scale(EntityKingCrab entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize() * 0.7F; f *= entity.getScale(); matrixStackIn.scale(f, f, f); this.shadowRadius = f * 0.6F; } public @NotNull ResourceLocation getTextureLocation(EntityKingCrab entity) { return entity.getTexture(); } }
1,096
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererFootballFish.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererFootballFish.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.model.EntityModel; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.layer.LayerFootballFishLure; import untamedwilds.client.model.ModelFootballFish; import untamedwilds.entity.fish.EntityFootballFish; import javax.annotation.Nonnull; public class RendererFootballFish extends MobRenderer<EntityFootballFish, EntityModel<EntityFootballFish>> { private static final ModelFootballFish FOOTBALL_FISH_MODEL = new ModelFootballFish(); public RendererFootballFish(EntityRendererProvider.Context rendermanager) { super(rendermanager, FOOTBALL_FISH_MODEL, 0.6F); this.addLayer(new LayerFootballFishLure<>(this)); } protected void scale(EntityFootballFish entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize() * 0.8F; f *= entity.getScale(); matrixStackIn.scale(f, f, f); this.shadowRadius = f * 0.6F; } public @NotNull ResourceLocation getTextureLocation(EntityFootballFish entity) { return entity.getTexture(); } }
1,334
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererBaleenWhale.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererBaleenWhale.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.model.EntityModel; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelBaleenWhale; import untamedwilds.entity.mammal.EntityBaleenWhale; public class RendererBaleenWhale extends MobRenderer<EntityBaleenWhale, EntityModel<EntityBaleenWhale>> { private static final ModelBaleenWhale WHALE_MODEL = new ModelBaleenWhale(); public RendererBaleenWhale(EntityRendererProvider.Context rendermanager) { super(rendermanager, WHALE_MODEL, 0.2F); } @Override protected void scale(EntityBaleenWhale entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize(); f *= entity.getScale(); matrixStackIn.scale(f, f, f); this.shadowRadius = f; } public @NotNull ResourceLocation getTextureLocation(EntityBaleenWhale entity) { return entity.getTexture(); } }
1,161
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererSoftshellTurtle.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererSoftshellTurtle.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.client.model.EntityModel; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelTurtleSoftshell; import untamedwilds.entity.reptile.EntitySoftshellTurtle; import javax.annotation.Nonnull; public class RendererSoftshellTurtle extends MobRenderer<EntitySoftshellTurtle, EntityModel<EntitySoftshellTurtle>> { private static final ModelTurtleSoftshell SOFTSHELL_TURTLE_MODEL = new ModelTurtleSoftshell(); public RendererSoftshellTurtle(EntityRendererProvider.Context rendererManager) { super(rendererManager, SOFTSHELL_TURTLE_MODEL, 0.4F); } @Override protected void scale(EntitySoftshellTurtle entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize() * 0.8F; f *= entity.getScale(); matrixStackIn.scale(f, f, f); this.shadowRadius = f * 0.4F; } public @NotNull ResourceLocation getTextureLocation(EntitySoftshellTurtle entity) { return entity.getTexture(); } }
1,278
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererSpitter.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererSpitter.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.model.EntityModel; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.MonsterSpitter; import untamedwilds.client.model.MonsterSpitterLarva; import untamedwilds.entity.relict.EntitySpitter; public class RendererSpitter extends MobRenderer<EntitySpitter, EntityModel<EntitySpitter>> { private static final MonsterSpitter SPITTER_MODEL = new MonsterSpitter(); private static final MonsterSpitterLarva SPITTER_MODEL_LARVA = new MonsterSpitterLarva(); public RendererSpitter(EntityRendererProvider.Context renderManager) { super(renderManager, SPITTER_MODEL, 1F); } @Override public void render(EntitySpitter entityIn, float entityYaw, float partialTicks, PoseStack matrixStackIn, MultiBufferSource bufferIn, int packedLightIn) { if (entityIn.isBaby()) { model = SPITTER_MODEL_LARVA; } else { model = SPITTER_MODEL; } super.render(entityIn, entityYaw, partialTicks, matrixStackIn, bufferIn, packedLightIn); } protected void scale(EntitySpitter entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize(); //f *= entity.getScale(); matrixStackIn.scale(f, f, f); this.shadowRadius = f; } @Override public @NotNull ResourceLocation getTextureLocation(EntitySpitter entity) { return entity.getTexture(); } }
1,748
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererRhino.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererRhino.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.client.model.EntityModel; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelRhino; import untamedwilds.client.model.ModelRhinoCalf; import untamedwilds.entity.mammal.EntityRhino; import javax.annotation.Nonnull; public class RendererRhino extends MobRenderer<EntityRhino, EntityModel<EntityRhino>> { private static final ModelRhino RHINO_MODEL = new ModelRhino(); private static final ModelRhinoCalf RHINO_MODEL_CALF = new ModelRhinoCalf(); public RendererRhino(EntityRendererProvider.Context renderManager) { super(renderManager, RHINO_MODEL, 1F); } @Override public void render(EntityRhino entityIn, float entityYaw, float partialTicks, PoseStack matrixStackIn, MultiBufferSource bufferIn, int packedLightIn) { if (entityIn.isBaby()) { model = RHINO_MODEL_CALF; } else { model = RHINO_MODEL; } super.render(entityIn, entityYaw, partialTicks, matrixStackIn, bufferIn, packedLightIn); } protected void scale(EntityRhino entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize(); //f *= entity.getScale(); matrixStackIn.scale(f, f, f); this.shadowRadius = f; } public @NotNull ResourceLocation getTextureLocation(EntityRhino entity) { return entity.getTexture(); } }
1,713
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererSnake.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererSnake.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.client.model.EntityModel; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelSnake; import untamedwilds.entity.reptile.EntitySnake; import javax.annotation.Nonnull; public class RendererSnake extends MobRenderer<EntitySnake, EntityModel<EntitySnake>> { private static final ModelSnake SNAKE_MODEL = new ModelSnake(); public RendererSnake(EntityRendererProvider.Context renderManager) { super(renderManager, SNAKE_MODEL, 0F); } protected void scale(EntitySnake entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize(); f *= entity.getScale(); matrixStackIn.scale(f, f, f); } public @NotNull ResourceLocation getTextureLocation(EntitySnake entity) { return entity.getTexture(); } }
1,090
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererAnaconda.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererAnaconda.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.model.EntityModel; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelAnaconda; import untamedwilds.entity.reptile.EntityAnaconda; public class RendererAnaconda extends MobRenderer<EntityAnaconda, EntityModel<EntityAnaconda>> { private static final ModelAnaconda SNAKE_MODEL = new ModelAnaconda(); public RendererAnaconda(EntityRendererProvider.Context renderManager) { super(renderManager, SNAKE_MODEL, 0F); } protected void scale(EntityAnaconda entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize(); f *= entity.getScale(); matrixStackIn.scale(f, f, f); } public @NotNull ResourceLocation getTextureLocation(EntityAnaconda entity) { return entity.getTexture(); } }
1,086
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererNewt.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererNewt.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.client.model.EntityModel; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelNewt; import untamedwilds.entity.amphibian.EntityNewt; import javax.annotation.Nonnull; public class RendererNewt extends MobRenderer<EntityNewt, EntityModel<EntityNewt>> { private static final ModelNewt NEWT_MODEL = new ModelNewt(); public RendererNewt(EntityRendererProvider.Context renderManager) { super(renderManager, NEWT_MODEL, 0.1F); } @Override protected void scale(EntityNewt entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize(); f *= entity.getScale(); matrixStackIn.scale(f, f, f); this.shadowRadius = f * 0.2F; } public @NotNull ResourceLocation getTextureLocation(EntityNewt entity) { return entity.getTexture(); } }
1,134
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererGiantClam.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererGiantClam.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.model.EntityModel; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.client.model.EntityModel; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelGiantClam; import untamedwilds.entity.mollusk.EntityGiantClam; import javax.annotation.Nonnull; public class RendererGiantClam extends MobRenderer<EntityGiantClam, EntityModel<EntityGiantClam>> { private static final ModelGiantClam GIANT_CLAM_MODEL = new ModelGiantClam(); public RendererGiantClam(EntityRendererProvider.Context renderManager) { super(renderManager, GIANT_CLAM_MODEL, 1F); } @Override protected void scale(EntityGiantClam entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize(); f *= entity.getScale(); matrixStackIn.scale(f, f, f); this.shadowRadius = f; } public @NotNull ResourceLocation getTextureLocation(EntityGiantClam entity) { return entity.getTexture(); } }
1,232
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererTarantula.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererTarantula.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.client.model.EntityModel; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelTarantula; import untamedwilds.entity.arthropod.EntityTarantula; import javax.annotation.Nonnull; public class RendererTarantula extends MobRenderer<EntityTarantula, ModelTarantula> { private static final ModelTarantula TARANTULA_MODEL = new ModelTarantula(); public RendererTarantula(EntityRendererProvider.Context renderManager) { super(renderManager, TARANTULA_MODEL, 0.2F); } @Override protected void scale(EntityTarantula entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize() * 0.7F; f *= entity.getScale(); matrixStackIn.scale(f, f, f); this.shadowRadius = f * 0.6F; } public @NotNull ResourceLocation getTextureLocation(EntityTarantula entity) { return entity.getTexture(); } }
1,187
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererShark.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererShark.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.client.model.EntityModel; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelShark; import untamedwilds.entity.fish.EntityShark; import javax.annotation.Nonnull; public class RendererShark extends MobRenderer<EntityShark, EntityModel<EntityShark>> { private static final ModelShark SHARK_MODEL = new ModelShark(); public RendererShark(EntityRendererProvider.Context rendermanager) { super(rendermanager, SHARK_MODEL, 0.2F); } @Override protected void scale(EntityShark entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize(); f *= entity.getScale(); matrixStackIn.scale(f, f, f); this.shadowRadius = f; } public @NotNull ResourceLocation getTextureLocation(EntityShark entity) { return entity.getTexture(); } }
1,133
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererArowana.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererArowana.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.model.EntityModel; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelArowana; import untamedwilds.entity.fish.EntityArowana; public class RendererArowana extends MobRenderer<EntityArowana, EntityModel<EntityArowana>> { private static final ModelArowana AROWANA_MODEL = new ModelArowana(); public RendererArowana(EntityRendererProvider.Context rendermanager) { super(rendermanager, AROWANA_MODEL, 0.2F); } @Override protected void scale(EntityArowana entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize() * 0.8F; f *= entity.getScale(); matrixStackIn.scale(f, f, f); this.shadowRadius = f * 0.5F; } public @NotNull ResourceLocation getTextureLocation(EntityArowana entity) { return entity.getTexture(); } }
1,138
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererBison.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererBison.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.client.model.EntityModel; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelBison; import untamedwilds.client.model.ModelBisonCalf; import untamedwilds.entity.mammal.EntityBison; import javax.annotation.Nonnull; public class RendererBison extends MobRenderer<EntityBison, EntityModel<EntityBison>> { private static final ModelBison BISON_MODEL = new ModelBison(); private static final ModelBisonCalf BISON_CALF_MODEL = new ModelBisonCalf(); public RendererBison(EntityRendererProvider.Context renderManager) { super(renderManager, BISON_MODEL, 1F); } @Override public void render(EntityBison entityIn, float entityYaw, float partialTicks, PoseStack matrixStackIn, MultiBufferSource bufferIn, int packedLightIn) { model = !entityIn.isBaby() ? BISON_MODEL : BISON_CALF_MODEL; super.render(entityIn, entityYaw, partialTicks, matrixStackIn, bufferIn, packedLightIn); } protected void scale(EntityBison entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize(); matrixStackIn.scale(f, f, f); this.shadowRadius = f * 0.6F; } public @NotNull ResourceLocation getTextureLocation(EntityBison entity) { return entity.getTexture(); } }
1,624
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererGiantSalamander.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererGiantSalamander.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.client.model.EntityModel; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelGiantSalamander; import untamedwilds.entity.amphibian.EntityGiantSalamander; import javax.annotation.Nonnull; public class RendererGiantSalamander extends MobRenderer<EntityGiantSalamander, EntityModel<EntityGiantSalamander>> { private static final ModelGiantSalamander GIANT_SALAMANDER_MODEL = new ModelGiantSalamander(); public RendererGiantSalamander(EntityRendererProvider.Context renderManager) { super(renderManager, GIANT_SALAMANDER_MODEL, 0.2F); } @Override protected void scale(EntityGiantSalamander entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize(); f *= entity.getScale(); matrixStackIn.scale(f, f, f); this.shadowRadius = f * 0.4F; } public @NotNull ResourceLocation getTextureLocation(EntityGiantSalamander entity) { return entity.getTexture(); } }
1,268
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererMonitor.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererMonitor.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.model.EntityModel; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelMonitor; import untamedwilds.entity.reptile.EntityMonitor; public class RendererMonitor extends MobRenderer<EntityMonitor, EntityModel<EntityMonitor>> { private static final ModelMonitor MODEL_MONITOR = new ModelMonitor(); public RendererMonitor(EntityRendererProvider.Context renderManager) { super(renderManager, MODEL_MONITOR, 0F); } protected void scale(EntityMonitor entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize(); f *= entity.getScale(); matrixStackIn.scale(f, f, f); } public @NotNull ResourceLocation getTextureLocation(EntityMonitor entity) { return entity.getTexture(); } }
1,080
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererSpadefish.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererSpadefish.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.model.EntityModel; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelSpadefish; import untamedwilds.entity.fish.EntitySpadefish; public class RendererSpadefish extends MobRenderer<EntitySpadefish, EntityModel<EntitySpadefish>> { private static final ModelSpadefish SPADEFISH_MODEL = new ModelSpadefish(); public RendererSpadefish(EntityRendererProvider.Context rendermanager) { super(rendermanager, SPADEFISH_MODEL, 0.2F); } @Override protected void scale(EntitySpadefish entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize() * 0.8F; f *= entity.getScale(); matrixStackIn.scale(f, f, f); this.shadowRadius = f * 0.5F; } public @NotNull ResourceLocation getTextureLocation(EntitySpadefish entity) { return entity.getTexture(); } }
1,161
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererTortoise.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererTortoise.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.client.model.EntityModel; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelTortoise; import untamedwilds.entity.reptile.EntityTortoise; import javax.annotation.Nonnull; public class RendererTortoise extends MobRenderer<EntityTortoise, EntityModel<EntityTortoise>> { private static final ModelTortoise SOFTSHELL_TURTLE_MODEL = new ModelTortoise(); public RendererTortoise(EntityRendererProvider.Context rendererManager) { super(rendererManager, SOFTSHELL_TURTLE_MODEL, 0.4F); } @Override protected void scale(EntityTortoise entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize() * 0.8F; f *= entity.getScale(); matrixStackIn.scale(f, f, f); this.shadowRadius = f * 0.4F; } public @NotNull ResourceLocation getTextureLocation(EntityTortoise entity) { return entity.getTexture(); } }
1,208
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererManatee.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererManatee.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.model.EntityModel; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelManatee; import untamedwilds.entity.mammal.EntityManatee; public class RendererManatee extends MobRenderer<EntityManatee, EntityModel<EntityManatee>> { private static final ModelManatee MANATEE_MODEL = new ModelManatee(); private static final ModelManatee MANATEE_MODEL_CALF = new ModelManatee(); public RendererManatee(EntityRendererProvider.Context renderManager) { super(renderManager, MANATEE_MODEL, 1F); } /*@Override public void render(EntityManatee entityIn, float entityYaw, float partialTicks, PoseStack matrixStackIn, MultiBufferSource bufferIn, int packedLightIn) { if (entityIn.isBaby()) { model = MANATEE_MODEL_CALF; } else { model = MANATEE_MODEL; } super.render(entityIn, entityYaw, partialTicks, matrixStackIn, bufferIn, packedLightIn); }*/ protected void scale(EntityManatee entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize(); f *= entity.getScale(); matrixStackIn.scale(f, f, f); this.shadowRadius = f; } public @NotNull ResourceLocation getTextureLocation(EntityManatee entity) { return entity.getTexture(); } }
1,660
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererBear.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererBear.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.client.model.EntityModel; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelBear; import untamedwilds.client.model.ModelBearCub; import untamedwilds.entity.mammal.EntityBear; public class RendererBear extends MobRenderer<EntityBear, EntityModel<EntityBear>> { private static final ModelBear BEAR_MODEL = new ModelBear(); private static final ModelBearCub BEAR_MODEL_CUB = new ModelBearCub(); public RendererBear(EntityRendererProvider.Context renderManager) { super(renderManager, BEAR_MODEL, 1F); } @Override public void render(EntityBear entityIn, float entityYaw, float partialTicks, PoseStack matrixStackIn, MultiBufferSource bufferIn, int packedLightIn) { if (entityIn.isBaby()) { model = BEAR_MODEL_CUB; } else { model = BEAR_MODEL; } super.render(entityIn, entityYaw, partialTicks, matrixStackIn, bufferIn, packedLightIn); } @Override protected void scale(EntityBear entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize(); //f *= entity.getScale(); matrixStackIn.scale(f, f, f); this.shadowRadius = f; } public @NotNull ResourceLocation getTextureLocation(EntityBear entity) { return entity.getTexture(); } }
1,669
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererCamel.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererCamel.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.model.EntityModel; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelCamel; import untamedwilds.client.model.ModelCamelCalf; import untamedwilds.entity.mammal.EntityCamel; public class RendererCamel extends MobRenderer<EntityCamel, EntityModel<EntityCamel>> { private static final ModelCamel CAMEL_MODEL = new ModelCamel(); private static final ModelCamelCalf CAMEL_CALF_MODEL = new ModelCamelCalf(); public RendererCamel(EntityRendererProvider.Context renderManager) { super(renderManager, CAMEL_MODEL, 1F); } @Override public void render(EntityCamel entityIn, float entityYaw, float partialTicks, PoseStack matrixStackIn, MultiBufferSource bufferIn, int packedLightIn) { model = !entityIn.isBaby() ? CAMEL_MODEL : CAMEL_CALF_MODEL; super.render(entityIn, entityYaw, partialTicks, matrixStackIn, bufferIn, packedLightIn); } protected void scale(EntityCamel entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize() * (entity.isBaby() ? 0.7F : 1F); matrixStackIn.scale(f, f, f); this.shadowRadius = f * 0.9F; } public @NotNull ResourceLocation getTextureLocation(EntityCamel entity) { return entity.getTexture(); } }
1,622
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
RendererBoar.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/render/RendererBoar.java
package untamedwilds.client.render; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.model.EntityModel; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import untamedwilds.client.model.ModelBoar; import untamedwilds.client.model.ModelBoarPiglet; import untamedwilds.client.model.ModelWarthog; import untamedwilds.entity.mammal.EntityBoar; public class RendererBoar extends MobRenderer<EntityBoar, EntityModel<EntityBoar>> { private static final ModelBoar BOAR_MODEL = new ModelBoar(); private static final ModelWarthog WARTHOG_MODEL = new ModelWarthog(); private static final ModelBoarPiglet BOAR_MODEL_PIGLET = new ModelBoarPiglet(); public RendererBoar(EntityRendererProvider.Context renderManager) { super(renderManager, BOAR_MODEL, 0.4F); } @Override public void render(EntityBoar entityIn, float entityYaw, float partialTicks, PoseStack matrixStackIn, MultiBufferSource bufferIn, int packedLightIn) { model = entityIn.isBaby() ? BOAR_MODEL_PIGLET : entityIn.isWarthog() ? WARTHOG_MODEL : BOAR_MODEL ; super.render(entityIn, entityYaw, partialTicks, matrixStackIn, bufferIn, packedLightIn); } protected void scale(EntityBoar entity, PoseStack matrixStackIn, float partialTickTime) { float f = entity.getMobSize(); f *= entity.isBaby() ? 0.8F : 1.0F; matrixStackIn.scale(f, f, f); this.shadowRadius = f * 0.6F; } public @NotNull ResourceLocation getTextureLocation(EntityBoar entity) { return entity.getTexture(); } }
1,787
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
ModelAnaconda.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/model/ModelAnaconda.java
package untamedwilds.client.model; import com.github.alexthe666.citadel.animation.IAnimatedEntity; import com.github.alexthe666.citadel.client.model.AdvancedEntityModel; import com.github.alexthe666.citadel.client.model.AdvancedModelBox; import com.github.alexthe666.citadel.client.model.ModelAnimator; import com.github.alexthe666.citadel.client.model.basic.BasicModelPart; import com.google.common.collect.ImmutableList; import com.mojang.math.Vector3d; import net.minecraft.util.Mth; import net.minecraft.world.level.ClipContext; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.Vec3; import untamedwilds.entity.reptile.EntityAnaconda; public class ModelAnaconda extends AdvancedEntityModel<EntityAnaconda> { public AdvancedModelBox body_5; public AdvancedModelBox body_6; public AdvancedModelBox body_4; public AdvancedModelBox body_7; public AdvancedModelBox body_8; public AdvancedModelBox body_9; public AdvancedModelBox body_10; public AdvancedModelBox body_11; public AdvancedModelBox body_12; public AdvancedModelBox body_13; public AdvancedModelBox body_3; public AdvancedModelBox body_2; public AdvancedModelBox body_1; public AdvancedModelBox head_main; public AdvancedModelBox body_head_top; public AdvancedModelBox body_head_top_1; public AdvancedModelBox body_snout_top; public AdvancedModelBox body_snout_top_1; private final ModelAnimator animator; private final AdvancedModelBox[] bodyParts; public ModelAnaconda() { this.texWidth = 64; this.texHeight = 32; this.body_7 = new AdvancedModelBox(this, 0, 0); this.body_7.setRotationPoint(0.0F, 0.01F, 8.0F); this.body_7.addBox(-3.0F, -4.0F, 0.0F, 6, 5, 8, 0.0F); this.body_snout_top_1 = new AdvancedModelBox(this, 14, 23); this.body_snout_top_1.setRotationPoint(0.0F, -0.4F, -3.0F); this.body_snout_top_1.addBox(-2.5F, -0.5F, -4.0F, 5, 2, 4, 0.0F); this.body_head_top_1 = new AdvancedModelBox(this, 18, 13); this.body_head_top_1.setRotationPoint(0.0F, 0.0F, -3.0F); this.body_head_top_1.addBox(-3.0F, -1.0F, -3.0F, 6, 2, 3, 0.0F); this.body_2 = new AdvancedModelBox(this, 28, 0); this.body_2.setRotationPoint(0.0F, 0.0F, -8.0F); this.body_2.addBox(-2.5F, -3.0F, -8.0F, 5, 4, 8, 0.0F); this.body_9 = new AdvancedModelBox(this, 0, 0); this.body_9.setRotationPoint(0.0F, 0.01F, 8.0F); this.body_9.addBox(-3.0F, -4.0F, 0.0F, 6, 5, 8, 0.0F); this.body_4 = new AdvancedModelBox(this, 0, 0); this.body_4.setRotationPoint(0.0F, 0.01F, 0.0F); this.body_4.addBox(-3.0F, -4.0F, -8.0F, 6, 5, 8, 0.0F); this.body_8 = new AdvancedModelBox(this, 0, 0); this.body_8.setRotationPoint(0.0F, 0.01F, 8.0F); this.body_8.addBox(-3.0F, -4.0F, 0.0F, 6, 5, 8, 0.0F); this.body_10 = new AdvancedModelBox(this, 0, 0); this.body_10.setRotationPoint(0.0F, 0.01F, 8.0F); this.body_10.addBox(-3.0F, -4.0F, 0.0F, 6, 5, 8, 0.0F); this.body_5 = new AdvancedModelBox(this, 0, 0); this.body_5.setRotationPoint(0.0F, 23.01F, 6); // rotation Z was 16 this.body_5.addBox(-3.0F, -4.0F, 0.0F, 6, 5, 8, 0.0F); this.head_main = new AdvancedModelBox(this, 0, 13); this.head_main.setRotationPoint(0.0F, -0.01F, -8.0F); this.head_main.addBox(-3.0F, -3.0F, -3.0F, 6, 4, 3, 0.0F); this.body_3 = new AdvancedModelBox(this, 0, 0); this.body_3.setRotationPoint(0.0F, 0.01F, -8.0F); this.body_3.addBox(-3.0F, -4.0F, -8.0F, 6, 5, 8, 0.0F); this.body_snout_top = new AdvancedModelBox(this, 0, 25); this.body_snout_top.setRotationPoint(0.0F, -0.4F, -3.0F); this.body_snout_top.addBox(-2.5F, -1.0F, -4.0F, 5, 2, 4, 0.0F); this.body_head_top = new AdvancedModelBox(this, 0, 20); this.body_head_top.setRotationPoint(0.0F, -1.5F, -3.0F); this.body_head_top.addBox(-3.0F, -1.5F, -3.0F, 6, 2, 3, 0.0F); this.body_6 = new AdvancedModelBox(this, 0, 0); this.body_6.setRotationPoint(0.0F, 0.01F, 8.0F); this.body_6.addBox(-3.0F, -4.0F, 0.0F, 6, 5, 8, 0.0F); this.body_1 = new AdvancedModelBox(this, 28, 0); this.body_1.setRotationPoint(0.0F, 0.01F, -8.0F); this.body_1.addBox(-2.5F, -3.0F, -8.0F, 5, 4, 8, 0.0F); this.body_11 = new AdvancedModelBox(this, 28, 0); this.body_11.setRotationPoint(0.0F, 0.0F, 8.0F); this.body_11.addBox(-2.5F, -3.0F, 0.0F, 5, 4, 8, 0.0F); this.body_12 = new AdvancedModelBox(this, 38, 12); this.body_12.setRotationPoint(0.0F, 0.01F, 8.0F); this.body_12.addBox(-2.0F, -3.0F, 0.0F, 4, 4, 8, 0.0F); this.body_13 = new AdvancedModelBox(this, 24, 21); this.body_13.setRotationPoint(0.0F, 0.0F, 8.0F); this.body_13.addBox(-1.5F, -2.0F, 0.0F, 3, 3, 8, 0.0F); this.body_6.addChild(this.body_7); this.body_head_top_1.addChild(this.body_snout_top_1); this.head_main.addChild(this.body_head_top_1); this.body_3.addChild(this.body_2); this.body_8.addChild(this.body_9); this.body_5.addChild(this.body_4); this.body_7.addChild(this.body_8); this.body_9.addChild(this.body_10); this.body_10.addChild(this.body_11); this.body_11.addChild(this.body_12); this.body_12.addChild(this.body_13); this.body_1.addChild(this.head_main); this.body_4.addChild(this.body_3); this.body_head_top.addChild(this.body_snout_top); this.head_main.addChild(this.body_head_top); this.body_5.addChild(this.body_6); this.body_2.addChild(this.body_1); this.bodyParts = new AdvancedModelBox[]{this.body_6, this.body_7, this.body_8, this.body_9, this.body_10, this.body_11, this.body_12, this.body_13}; animator = ModelAnimator.create(); this.updateDefaultPose(); } @Override public Iterable<BasicModelPart> parts() { return ImmutableList.of(this.body_5); } public void animate(IAnimatedEntity entity) { animator.update(entity); } @Override public Iterable<AdvancedModelBox> getAllParts() { return ImmutableList.of(head_main, body_head_top, body_head_top_1, body_snout_top, body_snout_top_1, body_1, body_2, body_3, body_4, body_5, body_6, body_7, body_8, body_9, body_10, body_11, body_12, body_13); } public void setupAnim(EntityAnaconda anaconda, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) { this.resetToDefaultPose(); animate(anaconda); limbSwing *= -1.2; float globalSpeed = 0.6f; float globalDegree = 2f; limbSwingAmount = 0.5F; // Pitch/Yaw handler if (anaconda.isInWater() && !anaconda.isOnGround()) { this.setRotateAngle(body_5, anaconda.getXRot() * ((float) Math.PI / 180F), 0, 0); } this.body_5.rotationPointX += (float)(Math.sin(limbSwing * -globalSpeed * 0.5) * (double)limbSwingAmount * (double)globalDegree * -4 - (double)(limbSwingAmount * globalDegree * -4)); limbSwingAmount /= Math.max((double) anaconda.sitProgress / 6, 1); float partialTicks = ageInTicks - anaconda.tickCount; float renderYaw = (float)anaconda.getMovementOffsets(0, partialTicks)[0] ; this.body_6.rotateAngleY += Mth.clamp((float)anaconda.getMovementOffsets(6, partialTicks)[0] - renderYaw, -15, 15) * 0.017453292F; this.body_8.rotateAngleY += Mth.clamp((float)anaconda.getMovementOffsets(12, partialTicks)[0] - renderYaw, -15, 15) * 0.017453292F; this.body_10.rotateAngleY += Mth.clamp((float)anaconda.getMovementOffsets(18, partialTicks)[0] - renderYaw, -15, 15) * 0.017453292F; this.body_12.rotateAngleY += Mth.clamp((float)anaconda.getMovementOffsets(24, partialTicks)[0] - renderYaw, -15, 15) * 0.017453292F; swing(head_main, 0.5f * globalSpeed, 0.6f * globalDegree, false, -5.4f, 0, limbSwing, limbSwingAmount); swing(body_1, 0.5f * globalSpeed, 0.8f * globalDegree, false, -4.4f, 0, limbSwing, limbSwingAmount); swing(body_2, 0.5f * globalSpeed, 0.6f * globalDegree, false, -3.6f, 0, limbSwing, limbSwingAmount); swing(body_3, 0.5f * globalSpeed, 1f * globalDegree, false, -2.8f, 0, limbSwing, limbSwingAmount); swing(body_4, 0.5f * globalSpeed, 0.8f * globalDegree, false, -2f, 0, limbSwing, limbSwingAmount); swing(body_5, 0.5f * globalSpeed, 1f * globalDegree, false, 0f, 0, limbSwing, limbSwingAmount); swing(body_6, 0.5f * globalSpeed, 0.8f * globalDegree, false, 2f, 0, limbSwing, limbSwingAmount); swing(body_7, 0.5f * globalSpeed, 1f * globalDegree, false, 2.8f, 0, limbSwing, limbSwingAmount); swing(body_8, 0.5f * globalSpeed, 0.6f * globalDegree, false, 3.6f, 0, limbSwing, limbSwingAmount); swing(body_9, 0.5f * globalSpeed, 0.8f * globalDegree, false, 4.4f, 0, limbSwing, limbSwingAmount); swing(body_10, 0.5f * globalSpeed, 0.6f * globalDegree, false, 5.4f, 0, limbSwing, limbSwingAmount); swing(body_11, 0.5f * globalSpeed, 0.6f * globalDegree, false, 6.6f, 0, limbSwing, limbSwingAmount); swing(body_12, 0.5f * globalSpeed, 0.8f * globalDegree, false, 7f, 0, limbSwing, limbSwingAmount); swing(body_13, 0.5f * globalSpeed, 0.6f * globalDegree, false, 8.2f, 0, limbSwing, limbSwingAmount); if (anaconda.isAngry()) { // Angry/Stalking Animation body_1.rotateAngleX += (float) Math.toRadians(-18.26F); head_main.rotateAngleX += (float) Math.toRadians(18.26F); body_head_top.rotateAngleX += (float) Math.toRadians(-41.74F); body_head_top_1.rotateAngleX += (float) Math.toRadians(49.57F); } if (!anaconda.isInWater() && !anaconda.isBaby() && anaconda.canMove()) { Vec3 position; double difference = 0F; int counter = 0; int parts = 0; //UntamedWilds.LOGGER.info("---ANACONDA CLIENT DATA---"); for (EntityAnaconda.EntityAnacondaPart multipart : anaconda.anacondaParts) { if (counter > 0 && counter < 3 && multipart.getParent() == anaconda) { position = multipart.getPosition(0).add(0, difference, 0); BlockHitResult rayTrace = anaconda.level.clip(new ClipContext(position.add(0, 3, 0), position.add(0, -3, 0), ClipContext.Block.COLLIDER, ClipContext.Fluid.ANY, null)); Vec3 vec3d = rayTrace.getLocation(); difference = vec3d.y() - position.y; float angle = Math.abs(difference) > 0.2 ? (float) Mth.atan2(difference, 0) : 0; /*UntamedWilds.LOGGER.info("Joint " + counter + ": " + angle); UntamedWilds.LOGGER.info("Ray Trace " + rayTrace.getHitVec() + " BlockPos: " + position); UntamedWilds.LOGGER.info("Difference: " + difference + " (" + vec3d.getY() + " " + position.getY() + ")"); */ float newZ = Mth.lerp(0.1F, anaconda.buffer[counter], this.bodyParts[counter].defaultRotationX + angle); this.bodyParts[parts].rotateAngleX = newZ / 2; this.bodyParts[parts + 1].rotateAngleX = newZ / 4; this.bodyParts[parts + 2].rotateAngleX = -newZ / 4; this.bodyParts[parts + 3].rotateAngleX = -newZ / 2; anaconda.buffer[counter] = newZ; parts += 4; } counter++; } } // Sitting Animation if (anaconda.sitProgress != 0) { this.progressPosition(body_5, anaconda.sitProgress, -8.0F, 23.0F, -3.0F, anaconda.ticksToSit); this.progressRotation(body_1, anaconda.sitProgress, (float) Math.toRadians(39.13F), (float) Math.toRadians(67.83F), (float) Math.toRadians(44.35F), anaconda.ticksToSit); this.progressRotation(body_2, anaconda.sitProgress,(float) Math.toRadians(-15.65F), (float) Math.toRadians(70.43F), 0, anaconda.ticksToSit); this.progressRotation(body_3, anaconda.sitProgress,0F, (float) Math.toRadians(75.65F), 0F, anaconda.ticksToSit); this.progressRotation(body_4, anaconda.sitProgress,0F, (float) Math.toRadians(75.65F), 0F, anaconda.ticksToSit); this.progressRotation(body_5, anaconda.sitProgress,0F, (float) Math.toRadians(67.83F), 0F, anaconda.ticksToSit); this.progressRotation(body_6, anaconda.sitProgress,0F, (float) Math.toRadians(-57.39F), 0F, anaconda.ticksToSit); this.progressRotation(body_7, anaconda.sitProgress,0F, (float) Math.toRadians(49.57F), 0F, anaconda.ticksToSit); this.progressRotation(body_8, anaconda.sitProgress,0F, (float) Math.toRadians(57.39F), 0F, anaconda.ticksToSit); this.progressRotation(body_9, anaconda.sitProgress,0F, (float) Math.toRadians(75.65F), 0F, anaconda.ticksToSit); this.progressRotation(body_10, anaconda.sitProgress,0F, (float) Math.toRadians(62.61F), 0F, anaconda.ticksToSit); this.progressRotation(body_11, anaconda.sitProgress,0F, (float) Math.toRadians(-49.57F), 0F, anaconda.ticksToSit); this.progressRotation(body_12, anaconda.sitProgress,0F, (float) Math.toRadians(39.13F), 0F, anaconda.ticksToSit); this.progressRotation(body_13, anaconda.sitProgress,0F, (float) Math.toRadians(49.57F), 0F, anaconda.ticksToSit); } } }
13,588
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
ModelHyena.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/model/ModelHyena.java
package untamedwilds.client.model; import com.github.alexthe666.citadel.animation.IAnimatedEntity; import com.github.alexthe666.citadel.client.model.AdvancedEntityModel; import com.github.alexthe666.citadel.client.model.AdvancedModelBox; import com.github.alexthe666.citadel.client.model.ModelAnimator; import com.github.alexthe666.citadel.client.model.basic.BasicModelPart; import com.google.common.collect.ImmutableList; import net.minecraft.util.Mth; import untamedwilds.entity.mammal.EntityHyena; public class ModelHyena extends AdvancedEntityModel<EntityHyena> { public AdvancedModelBox body_main; public AdvancedModelBox head_neck; public AdvancedModelBox arm_left_upper; public AdvancedModelBox leg_left_upper; public AdvancedModelBox tail_1; public AdvancedModelBox arm_right_upper; public AdvancedModelBox leg_right_upper; public AdvancedModelBox head_main; public AdvancedModelBox hair; public AdvancedModelBox eye_right; public AdvancedModelBox eye_left; public AdvancedModelBox head_snout; public AdvancedModelBox head_jaw; public AdvancedModelBox ear_right; public AdvancedModelBox ear_left; public AdvancedModelBox arm_left_lower; public AdvancedModelBox leg_left_lower; public AdvancedModelBox arm_right_lower; public AdvancedModelBox leg_right_lower; private final ModelAnimator animator; private float tailX = -1; public ModelHyena() { this.texWidth = 64; this.texHeight = 32; this.leg_left_lower = new AdvancedModelBox(this, 48, 10); this.leg_left_lower.mirror = true; this.leg_left_lower.setRotationPoint(0.5F, 2.0F, 2.0F); this.leg_left_lower.addBox(-1.0F, 0.0F, -1.0F, 2, 7, 2, 0.0F); this.setRotateAngle(leg_left_lower, 0.36425021489121656F, 0.045553093477052F, 0.045553093477052F); this.leg_right_lower = new AdvancedModelBox(this, 48, 10); this.leg_right_lower.setRotationPoint(-0.5F, 2.0F, 2.0F); this.leg_right_lower.addBox(-1.0F, 0.0F, -1.0F, 2, 7, 2, 0.0F); this.setRotateAngle(leg_right_lower, 0.36425021489121656F, -0.045553093477052F, -0.045553093477052F); this.body_main = new AdvancedModelBox(this, 0, 0); this.body_main.setRotationPoint(0.0F, 16.1F, 1.0F); this.body_main.addBox(-3.0F, -5.0F, -6.0F, 6, 7, 11, 0.0F); this.setRotateAngle(body_main, -0.136659280431156F, 0.0F, 0.0F); this.arm_left_upper = new AdvancedModelBox(this, 36, 11); this.arm_left_upper.mirror = true; this.arm_left_upper.setRotationPoint(2.0F, -2.7F, -3.2F); this.arm_left_upper.addBox(-1.0F, 0.0F, -2.5F, 3, 6, 3, 0.0F); this.setRotateAngle(arm_left_upper, 0.045553093477052F, -0.0F, -0.091106186954104F); this.tail_1 = new AdvancedModelBox(this, 23, 0); this.tail_1.setRotationPoint(0.0F, -3.0F, 5.0F); this.tail_1.addBox(-1.5F, -1.5F, 0.0F, 3, 3, 8, 0.0F); this.setRotateAngle(tail_1, -1.1383037381507017F, 0.0F, 0.0F); this.eye_right = new AdvancedModelBox(this, 0, 22); this.eye_right.setRotationPoint(-2.51F, -2.0F, -3.01F); this.eye_right.addBox(0.0F, 0.0F, 0.0F, 2, 1, 1, 0.0F); this.ear_left = new AdvancedModelBox(this, 0, 18); this.ear_left.mirror = true; this.ear_left.setRotationPoint(1.2F, -2.5F, -1.0F); this.ear_left.addBox(0.0F, -2.0F, 0.0F, 2, 2, 1, 0.0F); this.setRotateAngle(ear_left, 0.0F, -0.045553093477052F, 0.31869712141416456F); this.arm_left_lower = new AdvancedModelBox(this, 38, 20); this.arm_left_lower.mirror = true; this.arm_left_lower.setRotationPoint(1.0F, 4.6F, -0.2F); this.arm_left_lower.addBox(-1.5F, 0.0F, -1.5F, 2, 7, 2, 0.0F); this.setRotateAngle(arm_left_lower, -0.091106186954104F, 0.0F, 0.045553093477052F); this.hair = new AdvancedModelBox(this, 24, 22); this.hair.setRotationPoint(0.0F, -1.0F, -2.7F); this.hair.addBox(-1.0F, -2.0F, -4.0F, 2, 2, 8, 0.0F); this.head_neck = new AdvancedModelBox(this, 0, 21); this.head_neck.setRotationPoint(0.0F, -2.6F, -4.0F); this.head_neck.addBox(-2.0F, -1.6F, -6.0F, 4, 5, 6, 0.0F); this.setRotateAngle(head_neck, -0.5918411493512771F, 0.0F, 0.0F); this.head_snout = new AdvancedModelBox(this, 0, 0); this.head_snout.setRotationPoint(0.0F, -1.2F, -2.0F); this.head_snout.addBox(-1.5F, 0.0F, -4.0F, 3, 2, 4, 0.0F); this.setRotateAngle(head_snout, 0.136659280431156F, 0.0F, 0.0F); this.head_jaw = new AdvancedModelBox(this, 0, 6); this.head_jaw.setRotationPoint(0.0F, 0.8F, -1.7F); this.head_jaw.addBox(-1.5F, 0.0F, -4.0F, 3, 1, 4, 0.0F); this.setRotateAngle(head_jaw, 0.091106186954104F, 0.0F, 0.0F); this.leg_right_upper = new AdvancedModelBox(this, 48, 0); this.leg_right_upper.setRotationPoint(-2.0F, -2.2F, 4.4F); this.leg_right_upper.addBox(-2.0F, -1.0F, -3.0F, 3, 5, 5, 0.0F); this.setRotateAngle(leg_right_upper, -0.27314402793711257F, -0.0F, 0.045553093477052F); this.head_main = new AdvancedModelBox(this, 14, 18); this.head_main.setRotationPoint(0.0F, 1.1F, -4.5F); this.head_main.addBox(-2.5F, -3.0F, -3.0F, 5, 5, 4, 0.0F); this.setRotateAngle(head_main, 0.7740535232594852F, 0.0F, 0.0F); this.ear_right = new AdvancedModelBox(this, 0, 18); this.ear_right.setRotationPoint(-1.2F, -2.5F, -1.0F); this.ear_right.addBox(-2.0F, -2.0F, 0.0F, 2, 2, 1, 0.0F); this.setRotateAngle(ear_right, 0.0F, 0.045553093477052F, -0.31869712141416456F); this.arm_right_lower = new AdvancedModelBox(this, 38, 20); this.arm_right_lower.setRotationPoint(-1.0F, 4.6F, -0.2F); this.arm_right_lower.addBox(-0.5F, 0.0F, -1.5F, 2, 7, 2, 0.0F); this.setRotateAngle(arm_right_lower, -0.091106186954104F, 0.0F, -0.045553093477052F); this.arm_right_upper = new AdvancedModelBox(this, 36, 11); this.arm_right_upper.setRotationPoint(-2.0F, -2.7F, -3.2F); this.arm_right_upper.addBox(-2.0F, 0.0F, -2.5F, 3, 6, 3, 0.0F); this.setRotateAngle(arm_right_upper, 0.045553093477052F, -0.0F, 0.091106186954104F); this.eye_left = new AdvancedModelBox(this, 0, 22); this.eye_left.mirror = true; this.eye_left.setRotationPoint(2.51F, -2.0F, -3.01F); this.eye_left.addBox(-2.0F, 0.0F, 0.0F, 2, 1, 1, 0.0F); this.leg_left_upper = new AdvancedModelBox(this, 48, 0); this.leg_left_upper.mirror = true; this.leg_left_upper.setRotationPoint(2.0F, -2.2F, 4.4F); this.leg_left_upper.addBox(-1.0F, -1.0F, -3.0F, 3, 5, 5, 0.0F); this.setRotateAngle(leg_left_upper, -0.27314402793711257F, -0.0F, -0.045553093477052F); this.leg_left_upper.addChild(this.leg_left_lower); this.leg_right_upper.addChild(this.leg_right_lower); this.body_main.addChild(this.arm_left_upper); this.body_main.addChild(this.tail_1); this.head_main.addChild(this.eye_right); this.head_main.addChild(this.ear_left); this.arm_left_upper.addChild(this.arm_left_lower); this.head_neck.addChild(this.hair); this.body_main.addChild(this.head_neck); this.head_main.addChild(this.head_snout); this.head_main.addChild(this.head_jaw); this.body_main.addChild(this.leg_right_upper); this.head_neck.addChild(this.head_main); this.head_main.addChild(this.ear_right); this.arm_right_upper.addChild(this.arm_right_lower); this.body_main.addChild(this.arm_right_upper); this.head_main.addChild(this.eye_left); this.body_main.addChild(this.leg_left_upper); animator = ModelAnimator.create(); updateDefaultPose(); } @Override public Iterable<BasicModelPart> parts() { return ImmutableList.of(this.body_main); } @Override public Iterable<AdvancedModelBox> getAllParts() { return ImmutableList.of( body_main, head_neck, arm_left_upper, leg_left_upper, tail_1, arm_right_upper, leg_right_upper, head_main, hair, eye_right, eye_left, head_snout, head_jaw, ear_right, ear_left, arm_left_lower, leg_left_lower, arm_right_lower, leg_right_lower); } private void animate(IAnimatedEntity entityIn) { EntityHyena hyena = (EntityHyena) entityIn; animator.update(hyena); animator.setAnimation(EntityHyena.IDLE_TALK); animator.startKeyframe(10); this.rotate(animator, head_neck, -26.09F, 0, 0); this.rotate(animator, head_jaw, 26.09F, 0, 0); this.rotate(animator, head_main, -26.09F, 0, 0); animator.endKeyframe(); animator.resetKeyframe(10); animator.setAnimation(EntityHyena.ATTACK_BITE); animator.startKeyframe(5); this.rotate(animator, head_main, -10.43F, 15.65F, -20.87F); this.rotate(animator, head_jaw, 57.39F, 0, 0); this.rotate(animator, head_neck, 44.35F, 0, 0); animator.endKeyframe(); animator.startKeyframe(5); this.rotate(animator, head_main, -18.26F, -5.22F, 10.43F); this.rotate(animator, head_jaw, 57.39F, 0, 0); this.rotate(animator, head_neck, 20.87F, 0, 0); animator.endKeyframe(); animator.resetKeyframe(5); animator.setAnimation(EntityHyena.ATTACK_POUNCE); animator.startKeyframe(12); this.rotate(animator, body_main, -18.26F, 0, 0); animator.move(body_main, 0, -2, 0); this.rotate(animator, head_jaw, 52.17F, 0, 0); this.rotate(animator, arm_left_upper, -20.87F, 0, -20.87F); this.rotate(animator, arm_left_lower, -60F, 0, 7.83F); this.rotate(animator, arm_right_upper, -20.87F, 0, 20.87F); this.rotate(animator, arm_right_lower, -60F, 0, -7.83F); this.rotate(animator, leg_left_upper, 15.65F, 0, -2.61F); animator.move(leg_left_lower, 0, -1.5F, 0); this.rotate(animator, leg_right_upper, 15.65F, 0, 2.61F); animator.move(leg_right_lower, 0, -1.5F, 0); this.rotate(animator, tail_1, -15.65F, 0, 0); animator.endKeyframe(); animator.startKeyframe(6); this.rotate(animator, body_main, 2.61F, 0, 0); this.rotate(animator, head_neck, -10.43F, -5.22F, 7.83F); this.rotate(animator, head_main, 0, 2.61F, -18.26F); this.rotate(animator, head_jaw, 52.17F, 0, 0); this.rotate(animator, arm_left_upper, -52.17F, -18.26F, -10.44F); this.rotate(animator, arm_left_lower, -60F, 0, 7.83F); this.rotate(animator, arm_right_upper, -52.17F, 18.26F, 10.44F); this.rotate(animator, arm_right_lower, -60F, 0, -7.83F); this.rotate(animator, leg_left_upper, 62.61F, 15.65F, -2.61F); this.rotate(animator, leg_right_upper, 62.61F, -15.65F, 2.61F); this.rotate(animator, tail_1, -15.65F, 0, 0); animator.endKeyframe(); animator.startKeyframe(10); this.rotate(animator, body_main, 23.48F, 0, 0); this.rotate(animator, head_main, 0, 2.61F, -18.26F); this.rotate(animator, arm_left_upper, 5.22F, 0, -15.65F); this.rotate(animator, arm_left_lower, -60F, 0, 23.48F); animator.move(arm_left_upper, 0, 1F, 0); this.rotate(animator, arm_right_upper, 5.22F, 0, 15.65F); this.rotate(animator, arm_right_lower, -60F, 0, -23.48F); animator.move(arm_right_upper, 0, 1F, 0); this.rotate(animator, leg_left_upper, 2.61F, -5.22F, -10.43F); this.rotate(animator, leg_right_upper, 2.61F, 5.22F, 10.43F); this.rotate(animator, tail_1, -15.65F, 0, 0); animator.endKeyframe(); animator.startKeyframe(6); this.rotate(animator, body_main, 7.83F, 0, 0); animator.move(body_main, 0, 2, 0); this.rotate(animator, head_main, 2.61F, 7.83F, -2.61F); this.rotate(animator, arm_left_upper, 39.13F, 0, -15.65F); animator.move(arm_left_upper, 0, 3, 0); this.rotate(animator, arm_left_lower, -60F, 0, 23.48F); this.rotate(animator, arm_right_upper, 39.13F, 0, 15.65F); animator.move(arm_right_upper, 0, 3, 0); this.rotate(animator, arm_right_lower, -60F, 0, -23.48F); this.rotate(animator, leg_left_upper, -5.22F, 0, -2.61F); this.rotate(animator, leg_right_upper, -5.22F, 0, 2.61F); this.rotate(animator, tail_1, -15.65F, 0, 0); animator.endKeyframe(); animator.resetKeyframe(8); } public void setupAnim(EntityHyena hyena, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) { this.resetToDefaultPose(); animate(hyena); float globalSpeed = 2.8f; float globalDegree = 1f; limbSwingAmount = Math.min(0.6F, limbSwingAmount * 2); limbSwing *= 0.5F; //globalSpeed = 1; //limbSwing = big_cat.tickCount; //limbSwingAmount = 0.5F; // Breathing Animation final double scaleX = Math.sin(ageInTicks * 1 / 20F); final double scaleY = Math.sin(ageInTicks / 16); this.body_main.setScale((float) (1F + scaleX * 0.08F), (float) (1F + scaleY * 0.06F), 1.0F); bob(body_main, 0.4F * globalSpeed, 0.03F, false, ageInTicks / 20, 2); bob(arm_right_upper, 0.4F * globalSpeed, 0.03F, false, -ageInTicks / 20, 2); bob(arm_left_upper, 0.4F * globalSpeed, 0.03F, false, -ageInTicks / 20, 2); bob(leg_right_upper, 0.4F * globalSpeed, 0.03F, false, -ageInTicks / 20, 2); bob(leg_left_upper, 0.4F * globalSpeed, 0.03F, false, -ageInTicks / 20, 2); // Blinking Animation if (!hyena.shouldRenderEyes()) { this.eye_right.setRotationPoint(-1.5F, -2.0F, -1.5F); this.eye_left.setRotationPoint(1.5F, -2.0F, -1.5F); } // Head Tracking Animation if (!hyena.isSleeping()) { this.faceTarget(netHeadYaw, headPitch, 3, head_neck); this.faceTarget(netHeadYaw, headPitch, 3, head_main); } // Pitch/Yaw handler if (hyena.isInWater() && !hyena.isOnGround()) { limbSwing = ageInTicks / 3; limbSwingAmount = 0.5f; this.body_main.rotationPointY += 4; // Model offset to make the Big Cat "sink" in water (while not drowning) this.setRotateAngle(head_neck, -0.18203784098300857F, 0.0F, 0.0F); float pitch = Mth.clamp(hyena.getXRot() - 10, -25F, 25.0F); this.setRotateAngle(body_main, (float) (pitch * Math.PI / 180F), 0, 0); } // Movement Animation float newZ = Mth.lerp(0.4F, this.tailX, this.tail_1.defaultRotationX + (float)hyena.getCurrentSpeed() * 2); this.tail_1.rotateAngleX = newZ; this.tailX = newZ; if (hyena.canMove()) { if (hyena.getCurrentSpeed() > 0.06f || hyena.isAngry()) { // Running animation bob(body_main, 0.3F * globalSpeed, 0.5F, false, limbSwing, limbSwingAmount); walk(body_main, 0.3f * globalSpeed, 0.5f * globalDegree, true, 0.5F, 0f, limbSwing, limbSwingAmount); walk(head_neck, 0.3f * globalSpeed, -0.5f * globalDegree, true, 0.5F, 0f, limbSwing, limbSwingAmount); bob(arm_right_upper, 0.3F * globalSpeed, 0.8F, false, limbSwing, limbSwingAmount); walk(arm_right_upper, 0.3f * globalSpeed, globalDegree, true, 0F, 0f, limbSwing, limbSwingAmount); walk(arm_right_lower, 0.3f * globalSpeed, 0.6f * globalDegree, true, 0.2F, 0.2f, limbSwing, limbSwingAmount); bob(arm_left_upper, 0.3F * globalSpeed, 0.8F, false, limbSwing, limbSwingAmount); walk(arm_left_upper, 0.3f * globalSpeed, globalDegree, true, 0.6F, 0f, limbSwing, limbSwingAmount); walk(arm_left_lower, 0.3f * globalSpeed, 0.6f * globalDegree, true, 0.8F, 0.2f, limbSwing, limbSwingAmount); bob(leg_right_upper, 0.3F * globalSpeed, 0.8F, false, limbSwing, limbSwingAmount); walk(leg_right_upper, 0.3f * globalSpeed, globalDegree, true, 1.4F, 0f, limbSwing, limbSwingAmount); walk(leg_right_lower, 0.3f * globalSpeed, 0.6f * globalDegree, true, 1.6F, 0.2f, limbSwing, limbSwingAmount); bob(leg_left_upper, 0.3F * globalSpeed, 0.8F, false, limbSwing, limbSwingAmount); walk(leg_left_upper, 0.3f * globalSpeed, globalDegree, true, 2F, 0f, limbSwing, limbSwingAmount); walk(leg_left_lower, 0.3f * globalSpeed, 0.6f * globalDegree, true, 2.2F, 0.2f, limbSwing, limbSwingAmount); } else { // Walking Animation bob(body_main, 0.5F * globalSpeed, 0.2F, false, limbSwing, limbSwingAmount); walk(body_main, 0.5f * globalSpeed, 0.2f * globalDegree, true, 0.5F, 0f, limbSwing, limbSwingAmount); walk(head_neck, 0.5f * globalSpeed, -0.2f * globalDegree, true, 0.5F, 0f, limbSwing, limbSwingAmount); walk(arm_right_upper, 0.5f * globalSpeed, 0.6f * globalDegree, false, 2F, 0f, limbSwing, limbSwingAmount); walk(arm_right_lower, 0.5f * globalSpeed, 0.6f * globalDegree, false, 0F, -0.8f, limbSwing, limbSwingAmount * 1.2f); walk(arm_left_upper, 0.5f * globalSpeed, 0.6f * globalDegree, false, 5.0F, 0f, limbSwing, limbSwingAmount); walk(arm_left_lower, 0.5f * globalSpeed, 0.6f * globalDegree, false, 3F, -0.8f, limbSwing, limbSwingAmount * 1.2f); bob(leg_right_upper, 0.5F * globalSpeed, 0.6F, false, limbSwing, limbSwingAmount); walk(leg_right_upper, 0.5f * globalSpeed, 0.8F * globalDegree, true, 1F, 0f, limbSwing, limbSwingAmount); walk(leg_right_lower, 0.5f * globalSpeed, 0.4f * globalDegree, true, 1.2F, 0.2f, limbSwing, limbSwingAmount); bob(leg_left_upper, 0.5F * globalSpeed, 0.6F, false, limbSwing, limbSwingAmount); walk(leg_left_upper, 0.5f * globalSpeed, 0.8F * globalDegree, true, 3.4F, 0f, limbSwing, limbSwingAmount); walk(leg_left_lower, 0.5f * globalSpeed, 0.4f * globalDegree, true, 3.6F, 0.2f, limbSwing, limbSwingAmount); } } // Sitting Animation if (hyena.sitProgress > 0) { this.progressPosition(body_main, hyena.sitProgress, 0.0F, 22.5F, 1.0F, 40); this.progressPosition(leg_left_upper, hyena.sitProgress, 2.0F, -2.0F, 6F, 40); this.progressPosition(leg_right_upper, hyena.sitProgress, -2.0F, -2.0F, 6F, 40); this.progressRotation(body_main, hyena.sitProgress, 0.0F, 0.0F, 0.0F, 40); this.progressRotation(head_neck, hyena.sitProgress, -0.8F, 0.0F, 0.0F, 40); this.progressRotation(leg_left_upper, hyena.sitProgress, -0.27314402793711257F, -0.0F, -0.045553093477052F, 40); this.progressRotation(leg_left_lower, hyena.sitProgress, -1.2292353921796064F, -0.22759093446006054F, 0.045553093477052F, 40); this.progressRotation(arm_left_upper, hyena.sitProgress, 0.27314402793711207F, -6.200655107570901E-17F, -0.24361070658773F, 40); this.progressRotation(arm_left_lower, hyena.sitProgress, -1.8668041679331349F, 0.0F, 0.10803588069844901F, 40); this.progressRotation(leg_right_upper, hyena.sitProgress, -0.27314402793711257F, -0.0F, 0.045553093477052F, 40); this.progressRotation(leg_right_lower, hyena.sitProgress, -1.2292353921796064F, 0.22759093446006054F, -0.045553093477052F, 40); this.progressRotation(arm_right_upper, hyena.sitProgress, 0.27314402793711207F, 6.200655107570901E-17F, 0.24361070658773F, 40); this.progressRotation(arm_right_lower, hyena.sitProgress, -1.8668041679331349F, 0.0F, -0.10803588069844901F, 40); this.progressRotation(tail_1, hyena.sitProgress, -1.0471975511965976F, 0.0F, 0.0F, 40); } // Sleeping Animation if (hyena.sleepProgress > 0) { this.progressPosition(body_main, hyena.sleepProgress, -1.0F, 20F, 0.0F, 40); this.progressRotation(body_main, hyena.sleepProgress, 0, 0.0F, -1.50255395F, 40); this.progressRotation(leg_right_upper, hyena.sleepProgress, -0.500909495F , -0.0F, 0.045553093477052F, 40); this.progressRotation(leg_left_lower, hyena.sleepProgress, -0.13665928F, 0, 0.77405352F, 40); this.progressRotation(head_neck, hyena.sleepProgress, 0.27314402793711207F, 0.22759093446006054F, 0.0F, 40); this.progressRotation(head_main, hyena.sleepProgress, 0.4553564F, 0, 0.0F, 40); this.progressRotation(arm_right_upper, hyena.sleepProgress, -0.27314402793711207F, 0, 0.09110619F, 40); this.progressRotation(arm_left_lower, hyena.sleepProgress, -0.5009095F, -0.09110619F, 1.0472F, 40); } } }
20,862
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
ModelBigCatCub.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/model/ModelBigCatCub.java
package untamedwilds.client.model; import com.github.alexthe666.citadel.client.model.AdvancedEntityModel; import com.github.alexthe666.citadel.client.model.AdvancedModelBox; import com.github.alexthe666.citadel.client.model.basic.BasicModelPart; import com.google.common.collect.ImmutableList; import net.minecraft.util.Mth; import untamedwilds.entity.mammal.EntityBigCat; public class ModelBigCatCub extends AdvancedEntityModel<EntityBigCat> { private final AdvancedModelBox main_body; private final AdvancedModelBox main_buttocks; private final AdvancedModelBox head_face; private final AdvancedModelBox arm_right; private final AdvancedModelBox arm_left; private final AdvancedModelBox leg_left; private final AdvancedModelBox leg_right; private final AdvancedModelBox tail_1; private final AdvancedModelBox tail_2; private final AdvancedModelBox head_snout; private final AdvancedModelBox ear_left; private final AdvancedModelBox ear_right; private final AdvancedModelBox eye_left; private final AdvancedModelBox eye_right; public ModelBigCatCub() { this.texWidth = 128; this.texHeight = 64; this.arm_left = new AdvancedModelBox(this, 114, 32); this.arm_left.mirror = true; this.arm_left.setRotationPoint(2.2F, -1.0F, -1.0F); this.arm_left.addBox(-1.5F, 0.0F, -1.5F, 3, 8, 3, 0.0F); this.eye_right = new AdvancedModelBox(this, 94, 25); this.eye_right.setRotationPoint(-0.51F, 0.0F, -3.01F); this.eye_right.addBox(-2.0F, -0.5F, -1.0F, 2, 1, 1, 0.0F); this.main_buttocks = new AdvancedModelBox(this, 96, 12); this.main_buttocks.setRotationPoint(0.0F, 0.0F, 6.5F); this.main_buttocks.addBox(-2.5F, -3.0F, -3.5F, 5, 6, 7, 0.0F); this.ear_right = new AdvancedModelBox(this, 110, 25); this.ear_right.setRotationPoint(-2.5F, -2.5F, -2.5F); this.ear_right.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 1, 0.0F); this.setRotateAngle(ear_right, -0.31869712141416456F, 0.31869712141416456F, -0.7285004297824331F); this.head_face = new AdvancedModelBox(this, 96, 25); this.head_face.setRotationPoint(0.0F, -2.5F, -3.0F); this.head_face.addBox(-2.5F, -2.5F, -4.0F, 5, 5, 4, 0.0F); this.setRotateAngle(head_face, 0.136659280431156F, 0.0F, 0.0F); this.leg_left = new AdvancedModelBox(this, 114, 32); this.leg_left.mirror = true; this.leg_left.setRotationPoint(2.4F, -1.0F, 1.0F); this.leg_left.addBox(-1.5F, 0.0F, -1.5F, 3, 8, 3, 0.0F); this.tail_2 = new AdvancedModelBox(this, 104, 37); this.tail_2.setRotationPoint(0.0F, 0.0F, 6.0F); this.tail_2.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 6, 0.0F); this.setRotateAngle(tail_2, 0.4553564018453205F, 0.0F, 0.0F); this.leg_right = new AdvancedModelBox(this, 114, 32); this.leg_right.setRotationPoint(-2.4F, -1.0F, 1.0F); this.leg_right.addBox(-1.5F, 0.0F, -1.5F, 3, 8, 3, 0.0F); this.ear_left = new AdvancedModelBox(this, 110, 25); this.ear_left.mirror = true; this.ear_left.setRotationPoint(2.5F, -2.5F, -2.5F); this.ear_left.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 1, 0.0F); this.setRotateAngle(ear_left, -0.31869712141416456F, -0.31869712141416456F, 0.7285004297824331F); this.main_body = new AdvancedModelBox(this, 96, 0); this.main_body.setRotationPoint(0.0F, 17.0F, -2.0F); this.main_body.addBox(-3.0F, -3.0F, -3.0F, 6, 6, 6, 0.0F); this.head_snout = new AdvancedModelBox(this, 114, 25); this.head_snout.setRotationPoint(0.0F, 1.0F, -1.3F); this.head_snout.addBox(-1.5F, -2.0F, -5.0F, 3, 3, 3, 0.0F); this.setRotateAngle(head_snout, 0.091106186954104F, 0.0F, 0.0F); this.arm_right = new AdvancedModelBox(this, 114, 32); this.arm_right.setRotationPoint(-2.2F, -1.0F, -1.0F); this.arm_right.addBox(-1.5F, 0.0F, -1.5F, 3, 8, 3, 0.0F); this.tail_1 = new AdvancedModelBox(this, 94, 34); this.tail_1.setRotationPoint(0.0F, -2.0F, 3.0F); this.tail_1.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 6, 0.0F); this.setRotateAngle(tail_1, -0.9560913642424937F, 0.0F, 0.0F); this.eye_left = new AdvancedModelBox(this, 94, 25); this.eye_left.mirror = true; this.eye_left.setRotationPoint(0.51F, 0.0F, -3.01F); this.eye_left.addBox(0.0F, -0.5F, -1.0F, 2, 1, 1, 0.0F); this.main_body.addChild(this.arm_left); this.head_face.addChild(this.eye_right); this.main_body.addChild(this.main_buttocks); this.head_face.addChild(this.ear_right); this.main_body.addChild(this.head_face); this.main_buttocks.addChild(this.leg_left); this.tail_1.addChild(this.tail_2); this.main_buttocks.addChild(this.leg_right); this.head_face.addChild(this.ear_left); this.head_face.addChild(this.head_snout); this.main_body.addChild(this.arm_right); this.main_buttocks.addChild(this.tail_1); this.head_face.addChild(this.eye_left); this.updateDefaultPose(); } @Override public Iterable<BasicModelPart> parts() { return ImmutableList.of(this.main_body); } @Override public Iterable<AdvancedModelBox> getAllParts() { return ImmutableList.of(main_body, main_buttocks, head_face, arm_right, arm_left, leg_left, leg_right, head_snout, ear_left, ear_right, eye_left, eye_right, tail_1, tail_2 ); } public void setupAnim(EntityBigCat big_cat, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) { this.resetToDefaultPose(); // Breathing Animation this.main_body.setScale((float) (1F + Math.sin(ageInTicks / 20) * 0.06F), (float) (1F + Math.sin(ageInTicks / 16) * 0.06F), 1.0F); this.main_buttocks.setScale((float) (1F + Math.sin(ageInTicks / 20) * 0.06F), (float) (1F + Math.sin(ageInTicks / 16) * 0.06F), 1.0F); bob(main_body, 0.4F * 1.5f, 0.03F, false, ageInTicks / 20, 2); bob(arm_right, 0.4F * 1.5f, 0.03F, false, -ageInTicks / 20, 2); bob(arm_left, 0.4F * 1.5f, 0.03F, false, -ageInTicks / 20, 2); bob(leg_right, 0.4F * 1.5f, 0.03F, false, -ageInTicks / 20, 2); bob(leg_left, 0.4F * 1.5f, 0.03F, false, -ageInTicks / 20, 2); flap(tail_1, 0.8f, 0.4f, true, 0F, 0f, ageInTicks / 6, 2); flap(tail_2, 0.8f, 0.4f, true, 0.5F, 0f, ageInTicks / 6, 2); // Blinking Animation if (!big_cat.shouldRenderEyes()) { this.eye_right.setRotationPoint(-0.49F, 0, -2F); this.eye_left.setRotationPoint(0.49F, 0, -2F); } // Head Tracking Animation this.faceTarget(netHeadYaw, headPitch, 1, head_face); // Movement Animation if (big_cat.canMove()) { this.arm_right.rotateAngleX = Mth.cos(limbSwing * 0.5F) * 1.4F * limbSwingAmount; this.arm_left.rotateAngleX = Mth.cos(limbSwing * 0.5F + (float)Math.PI) * 1.4F * limbSwingAmount; this.leg_right.rotateAngleX = Mth.cos(limbSwing * 0.5F + (float)Math.PI) * 1.4F * limbSwingAmount; this.leg_left.rotateAngleX = Mth.cos(limbSwing * 0.5F) * 1.4F * limbSwingAmount; } // Sitting Animation if (big_cat.sitProgress > 0) { this.progressRotation(main_body, big_cat.sitProgress, -0.5462880558742251F, 0.0F, 0.0F, 40); this.progressRotation(main_buttocks, big_cat.sitProgress, -0.7285004297824331F, 0.0F, 0.0F, 40); this.progressRotation(arm_left, big_cat.sitProgress, 0.18203784098300857F, 0.0F, 0.0F, 40); this.progressRotation(arm_right, big_cat.sitProgress, 0.18203784098300857F, 0.0F, 0.0F, 40); this.progressRotation(head_face, big_cat.sitProgress, 0.36425021489121656F, 0.0F, 0.0F, 40); this.progressRotation(leg_right, big_cat.sitProgress, -0.045553093477052F, 0.0F, 0.22759093446006054F, 40); this.progressRotation(leg_left, big_cat.sitProgress, -0.045553093477052F, 0.0F, -0.22759093446006054F, 40); this.progressRotation(tail_1, big_cat.sitProgress, 1.2685004297824331F, 0.0F, 0.0f, 40); this.progressPosition(main_body, big_cat.sitProgress, 0.0F, 17.5F, -1.0F, 40); this.progressPosition(main_buttocks, big_cat.sitProgress, 0.0F, 2.0F, 3.5F, 40); } // Sleeping Animation else if (big_cat.isSleeping()) { this.progressRotation(main_buttocks, big_cat.sleepProgress, -0.136659280431156F, 0.0F, 0.0F, 40); this.progressRotation(leg_right, big_cat.sleepProgress, 1.5025539530419183F, -0.40980330836826856F, 0.0F, 40); this.progressRotation(leg_left, big_cat.sleepProgress, 1.5025539530419183F, 0.40980330836826856F, 0.0F, 40); this.progressRotation(arm_left, big_cat.sleepProgress, -1.3658946726107624F, -0.36425021489121656F, 0.0F, 40); this.progressRotation(arm_right, big_cat.sleepProgress, -1.3658946726107624F, 0.36425021489121656F, 0.0F, 40); this.progressPosition(main_body, big_cat.sleepProgress, 0.0F, 22.0F, -2.0F, 40); this.progressPosition(main_buttocks, big_cat.sleepProgress, 0.0F, 0.0F, 6.0F, 40); this.progressPosition(head_face, big_cat.sleepProgress, 0.0F, -0.5F, -2.5F, 40); this.progressPosition(arm_right, big_cat.sleepProgress, -2.5F, 0.0F, -1.0F, 40); this.progressPosition(arm_left, big_cat.sleepProgress, 2.5F, 0.0F, -1.0F, 40); this.progressPosition(leg_right, big_cat.sleepProgress, -2.8F, 0.0F, 1.0F, 40); this.progressPosition(leg_left, big_cat.sleepProgress, 2.8F, 0.0F, 1.0F, 40); } } }
9,840
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
ModelSnake.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/model/ModelSnake.java
package untamedwilds.client.model; import com.github.alexthe666.citadel.animation.IAnimatedEntity; import com.github.alexthe666.citadel.client.model.AdvancedEntityModel; import com.github.alexthe666.citadel.client.model.AdvancedModelBox; import com.github.alexthe666.citadel.client.model.ModelAnimator; import com.github.alexthe666.citadel.client.model.basic.BasicModelPart; import com.google.common.collect.ImmutableList; import net.minecraft.core.Direction; import net.minecraft.util.Mth; import untamedwilds.entity.reptile.EntitySnake; public class ModelSnake extends AdvancedEntityModel<EntitySnake> { public AdvancedModelBox main_neck; public AdvancedModelBox head_face; public AdvancedModelBox head_jaw; public AdvancedModelBox body_1; public AdvancedModelBox head_fangs; public AdvancedModelBox head_tongue; public AdvancedModelBox body_2; public AdvancedModelBox body_3; public AdvancedModelBox body_4; public AdvancedModelBox body_5; public AdvancedModelBox body_6; public AdvancedModelBox body_7; public AdvancedModelBox body_8; public AdvancedModelBox body_9; public AdvancedModelBox body_10; private final ModelAnimator animator; public ModelSnake() { this.texWidth = 32; this.texHeight = 32; this.main_neck = new AdvancedModelBox(this, 0, 0); this.main_neck.setRotationPoint(0.0F, 0.01F, -4.0F); this.main_neck.addBox(-1.5F, -1.0F, -1.0F, 3, 2, 1, 0.0F); this.head_face = new AdvancedModelBox(this, 0, 3); this.head_face.setRotationPoint(0.0F, 0.0F, -1.0F); this.head_face.addBox(-1.5F, -1.0F, -3.0F, 3, 1, 3, 0.0F); this.head_fangs = new AdvancedModelBox(this, 1, 8); this.head_fangs.setRotationPoint(0.0F, 0.0F, 0.5F); this.head_fangs.addBox(-1.0F, 0.0F, -3.0F, 2, 1, 1, 0.0F); this.head_jaw = new AdvancedModelBox(this, 0, 12); this.head_jaw.setRotationPoint(0.0F, 0.0F, -1.0F); this.head_jaw.addBox(-1.5F, 0.0F, -3.0F, 3, 1, 3, 0.0F); this.head_tongue = new AdvancedModelBox(this, -1, 16); this.head_tongue.setRotationPoint(0.0F, 0.0F, 0.0F); this.head_tongue.addBox(-1.5F, 0.0F, -3.0F, 3, 0, 4, 0.0F); this.setRotateAngle(head_tongue, -0.01F, 0F, 0F); this.body_1 = new AdvancedModelBox(this, 12, 0); this.body_1.setRotationPoint(0.0F, -0.01F, -4.0F); this.body_1.addBox(-1.0F, -1.0F, -4.0F, 2, 2, 4, 0.0F); this.body_1.setScale(0.9F, 0.9F, 1); this.body_2 = new AdvancedModelBox(this, 12, 0); this.body_2.setRotationPoint(0.0F, 0.01F, -4.0F); this.body_2.addBox(-1.0F, -1.0F, -4.0F, 2, 2, 4, 0.0F); this.body_2.setScale(1.1F, 1.1F, 1); this.body_3 = new AdvancedModelBox(this, 12, 0); this.body_3.setRotationPoint(0.0F, -0.01F, -4.0F); this.body_3.addBox(-1.0F, -1.0F, -4.0F, 2, 2, 4, 0.0F); this.body_3.setScale(1.2F, 1.2F, 1); this.body_4 = new AdvancedModelBox(this, 12, 0); this.body_4.setRotationPoint(0.0F, 0.01F, 0.0F); this.body_4.addBox(-1.0F, -1.0F, -4.0F, 2, 2, 4, 0.0F); this.body_4.setScale(1.3F, 1.3F, 1); this.body_5 = new AdvancedModelBox(this, 12, 0); this.body_5.setRotationPoint(0.0F, 23.0F, 0.0F); this.body_5.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 4, 0.0F); this.body_5.setScale(1.3F, 1.3F, 1); this.body_6 = new AdvancedModelBox(this, 12, 0); this.body_6.setRotationPoint(0.0F, 0.01F, 4.0F); this.body_6.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 4, 0.0F); this.body_6.setScale(1.3F, 1.3F, 1); this.body_7 = new AdvancedModelBox(this, 12, 0); this.body_7.setRotationPoint(0.0F, -0.01F, 4.0F); this.body_7.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 4, 0.0F); this.body_7.setScale(1.2F, 1.2F, 1); this.body_8 = new AdvancedModelBox(this, 12, 0); this.body_8.setRotationPoint(0.0F, 0.01F, 4.0F); this.body_8.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 4, 0.0F); this.body_8.setScale(1.1F, 1.1F, 1); this.body_9 = new AdvancedModelBox(this, 12, 0); this.body_9.setRotationPoint(0.0F, -0.01F, 4.0F); this.body_9.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 4, 0.0F); this.body_9.setScale(1F, 1F, 1); this.body_10 = new AdvancedModelBox(this, 12, 6); this.body_10.setRotationPoint(0.0F, 0.01F, 4.0F); this.body_10.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 4, 0.0F); this.body_10.setScale(0.8F, 0.8F, 1); this.body_8.addChild(this.body_9); this.body_1.addChild(this.main_neck); this.body_7.addChild(this.body_8); this.main_neck.addChild(this.head_jaw); this.body_2.addChild(this.body_1); this.body_5.addChild(this.body_4); this.body_9.addChild(this.body_10); this.main_neck.addChild(this.head_face); this.head_face.addChild(this.head_fangs); this.body_4.addChild(this.body_3); this.body_5.addChild(this.body_6); this.head_jaw.addChild(this.head_tongue); this.body_6.addChild(this.body_7); this.body_3.addChild(this.body_2); animator = ModelAnimator.create(); updateDefaultPose(); } @Override public Iterable<BasicModelPart> parts() { return ImmutableList.of(this.body_5); } public void animate(IAnimatedEntity entity) { animator.update(entity); animator.setAnimation(EntitySnake.ANIMATION_TONGUE); animator.startKeyframe(4); this.rotate(animator, head_tongue, 26.08F, 36.52F, 0); animator.move(head_tongue, 0, 0, -2.5F); animator.endKeyframe(); animator.startKeyframe(3); this.rotate(animator, head_tongue, -26.08F, -36.52F, 0); animator.move(head_tongue, 0, 0, -3F); animator.endKeyframe(); animator.resetKeyframe(3); } @Override public Iterable<AdvancedModelBox> getAllParts() { return ImmutableList.of( main_neck, head_face, head_jaw, body_1, head_fangs, head_tongue, body_2, body_3, body_4, body_5, body_6, body_7, body_8, body_9, body_10 ); } public void setupAnim(EntitySnake snake, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) { this.resetToDefaultPose(); animate(snake); limbSwing *= -1.2; float globalSpeed = 1f; float globalDegree = 2f; limbSwingAmount = 0.5F; // Pitch/Yaw handler if (snake.isInWater() && !snake.isOnGround()) { this.setRotateAngle(body_5, (float) (snake.getDeltaMovement().get(Direction.Axis.Y) * -30 * Math.PI / 180F), 0, 0); } this.body_1.rotateAngleY = Mth.rotLerp((float) 0.05, this.body_4.rotateAngleY, snake.offset); this.body_9.rotateAngleY = Mth.rotLerp((float) 0.05, this.body_6.rotateAngleY, -1F * snake.offset); this.body_10.rotateAngleY = Mth.rotLerp((float) 0.05, this.body_8.rotateAngleY, -2F * snake.offset); // Movement Animation // This chunk gives the snakes a slithering motion, replacing limbSwingAmount with a constant value prevents the snake from going stiff once not moving limbSwingAmount /= Math.max((double) snake.sitProgress / 6, 1); swing(main_neck, 0.5f * globalSpeed, 0.6f * globalDegree, false, -5.4f, 0, limbSwing, limbSwingAmount); swing(body_1, 0.5f * globalSpeed, 0.8f * globalDegree, false, -4.4f, 0, limbSwing, limbSwingAmount); swing(body_2, 0.5f * globalSpeed, 0.6f * globalDegree, false, -3.6f, 0, limbSwing, limbSwingAmount); swing(body_3, 0.5f * globalSpeed, 1f * globalDegree, false, -2.8f, 0, limbSwing, limbSwingAmount); swing(body_4, 0.5f * globalSpeed, 0.8f * globalDegree, false, -2f, 0, limbSwing, limbSwingAmount); swing(body_5, 0.5f * globalSpeed, 1f * globalDegree, false, 0f, 0, limbSwing, limbSwingAmount); swing(body_6, 0.5f * globalSpeed, 0.8f * globalDegree, false, 2f, 0, limbSwing, limbSwingAmount); swing(body_7, 0.5f * globalSpeed, 1f * globalDegree, false, 2.8f, 0, limbSwing, limbSwingAmount); swing(body_8, 0.5f * globalSpeed, 0.6f * globalDegree, false, 3.6f, 0, limbSwing, limbSwingAmount); swing(body_9, 0.5f * globalSpeed, 0.8f * globalDegree, false, 4.4f, 0, limbSwing, limbSwingAmount); swing(body_10, 0.5f * globalSpeed, 0.6f * globalDegree, false, 5.4f, 0, limbSwing, limbSwingAmount); if (snake.isAngry()) { // Angry/Stalking Animation body_1.rotateAngleX += (float) Math.toRadians(-18.26F); main_neck.rotateAngleX += (float) Math.toRadians(18.26F); head_face.rotateAngleX += (float) Math.toRadians(-41.74F); head_jaw.rotateAngleX += (float) Math.toRadians(49.57F); if (snake.isRattler()) { body_9.rotateAngleX += Math.toRadians(31.30F); body_10.rotateAngleX += Math.toRadians(60F); swing(body_10, globalSpeed, 0.2f * globalDegree, false, 0f, 0, snake.tickCount, 0.5F); flap(body_10, globalSpeed, 0.2f * globalDegree, false, 0f, 0, snake.tickCount, 0.5F); } } // Sitting Animation if (snake.sitProgress != 0) { this.progressPosition(body_5, snake.sitProgress, -4.0F, 23.0F, -3.0F, 20); this.progressRotation(body_1, snake.sitProgress, (float) Math.toRadians(39.13F), (float) Math.toRadians(67.83F), (float) Math.toRadians(44.35F), 20); this.progressRotation(body_2, snake.sitProgress,(float) Math.toRadians(-15.65F), (float) Math.toRadians(70.43F), 0, 20); this.progressRotation(body_3, snake.sitProgress,0F, (float) Math.toRadians(75.65F), 0F, 20); this.progressRotation(body_4, snake.sitProgress,0F, (float) Math.toRadians(75.65F), 0F, 20); this.progressRotation(body_5, snake.sitProgress,0F, (float) Math.toRadians(67.83F), 0F, 20); this.progressRotation(body_6, snake.sitProgress,0F, (float) Math.toRadians(-57.39F), 0F, 20); this.progressRotation(body_7, snake.sitProgress,0F, (float) Math.toRadians(49.57F), 0F, 20); this.progressRotation(body_8, snake.sitProgress,0F, (float) Math.toRadians(57.39F), 0F, 20); this.progressRotation(body_9, snake.sitProgress,0F, (float) Math.toRadians(75.65F), 0F, 20); this.progressRotation(body_10, snake.sitProgress,0F, (float) Math.toRadians(62.61F), 0F, 20); } } }
10,680
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
ModelTortoise.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/model/ModelTortoise.java
package untamedwilds.client.model; import com.github.alexthe666.citadel.animation.IAnimatedEntity; import com.github.alexthe666.citadel.client.model.AdvancedEntityModel; import com.github.alexthe666.citadel.client.model.AdvancedModelBox; import com.github.alexthe666.citadel.client.model.ModelAnimator; import com.github.alexthe666.citadel.client.model.basic.BasicModelPart; import com.google.common.collect.ImmutableList; import untamedwilds.entity.reptile.EntityTortoise; public class ModelTortoise extends AdvancedEntityModel<EntityTortoise> { public AdvancedModelBox body_main; public AdvancedModelBox neck; public AdvancedModelBox hand_right; public AdvancedModelBox leg_right; public AdvancedModelBox main_body; public AdvancedModelBox hand_left; public AdvancedModelBox leg_left; public AdvancedModelBox body_tail; public AdvancedModelBox head; public AdvancedModelBox shape8; private final ModelAnimator animator; public ModelTortoise() { this.texWidth = 64; this.texHeight = 32; this.leg_right = new AdvancedModelBox(this, 0, 10); this.leg_right.setRotationPoint(-2.4F, -0.4F, 3.9F); this.leg_right.addBox(-1.5F, 0.0F, 0.0F, 3, 4, 2, 0.0F); this.setRotateAngle(leg_right, 0.18203784098300868F, -1.0471975511965976F, -0.13665928043115697F); this.neck = new AdvancedModelBox(this, 0, 17); this.neck.setRotationPoint(0.0F, -0.40000000000000036F, -3.3999999999999995F); this.neck.addBox(-1.5F, -1.0F, -4.0F, 3, 3, 4, 0.0F); this.setRotateAngle(neck, -0.3642502148912165F, 0.0F, 0.0F); this.main_body = new AdvancedModelBox(this, 20, 0); this.main_body.setRotationPoint(0.0F, 1.0F, 0.0F); this.main_body.addBox(-4.0F, -4.0F, -5.0F, 8, 4, 10, 0.0F); this.setRotateAngle(main_body, -0.091106186954104F, 0.0F, 0.0F); this.shape8 = new AdvancedModelBox(this, 0, 0); this.shape8.setRotationPoint(0.0F, -6.0F, 0.0F); this.shape8.addBox(-3.0F, 0.0F, -4.0F, 6, 2, 8, 0.0F); this.head = new AdvancedModelBox(this, 0, 24); this.head.setRotationPoint(0.0F, 0.30000000000000004F, -3.4000000000000004F); this.head.addBox(-1.5F, -1.5F, -4.0F, 3, 3, 4, 0.0F); this.setRotateAngle(head, 0.36425021489121656F, 0.0F, 0.0F); this.head.scaleX = 1.01F; this.body_tail = new AdvancedModelBox(this, 0, 0); this.body_tail.setRotationPoint(0.0F, 0.0F, 4.8F); this.body_tail.addBox(-0.5F, 0.0F, -0.5F, 1, 2, 1, 0.0F); this.setRotateAngle(body_tail, 0.31869712141416456F, 0.0F, 0.0F); this.leg_left = new AdvancedModelBox(this, 0, 10); this.leg_left.setRotationPoint(2.4F, -0.4F, 3.9F); this.leg_left.addBox(-1.5F, 0.0F, 0.0F, 3, 4, 2, 0.0F); this.setRotateAngle(leg_left, 0.18203784098300857F, 1.0471975511965976F, 0.13665928043115697F); this.hand_right = new AdvancedModelBox(this, 10, 10); this.hand_right.setRotationPoint(-3.1F, -0.1F, -4.299999999999999F); this.hand_right.addBox(-1.0F, 0.0F, -1.5F, 2, 4, 3, 0.0F); this.setRotateAngle(hand_right, -0.13665928043115597F, -1.2292353921796064F, 0.18203784098300857F); this.hand_left = new AdvancedModelBox(this, 10, 10); this.hand_left.mirror = true; this.hand_left.setRotationPoint(3.1F, -0.1F, -4.299999999999999F); this.hand_left.addBox(-1.0F, 0.0F, -1.5F, 2, 4, 3, 0.0F); this.setRotateAngle(hand_left, -0.13665928043115597F, 1.2292353921796064F, -0.18203784098300857F); this.body_main = new AdvancedModelBox(this, 26, 15); this.body_main.setRotationPoint(0.0F, 20.0F, 0.0F); this.body_main.addBox(-3.0F, -0.6F, -4.0F, 6, 2, 8, 0.0F); this.setRotateAngle(body_main, -0.045553093477052F, 0.0F, 0.0F); this.body_main.addChild(this.leg_right); this.body_main.addChild(this.neck); this.body_main.addChild(this.main_body); this.main_body.addChild(this.shape8); this.neck.addChild(this.head); this.body_main.addChild(this.body_tail); this.body_main.addChild(this.leg_left); this.body_main.addChild(this.hand_right); this.body_main.addChild(this.hand_left); animator = ModelAnimator.create(); updateDefaultPose(); } @Override public Iterable<BasicModelPart> parts() { return ImmutableList.of(this.body_main); } public void animate(IAnimatedEntity entity) { animator.update(entity); /*animator.setAnimation(EntitySnake.ANIMATION_TONGUE); animator.startKeyframe(4); this.rotate(animator, head_tongue, 26.08F, 36.52F, 0); animator.move(head_tongue, 0, 0, -2.5F); animator.endKeyframe(); animator.startKeyframe(3); this.rotate(animator, head_tongue, -26.08F, -36.52F, 0); animator.move(head_tongue, 0, 0, -3F); animator.endKeyframe(); animator.resetKeyframe(3);*/ } @Override public Iterable<AdvancedModelBox> getAllParts() { return ImmutableList.of( body_main, neck, hand_right, leg_right, main_body, hand_left, leg_left, body_tail, head, shape8 ); } public void setupAnim(EntityTortoise tortoise, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) { this.resetToDefaultPose(); animate(tortoise); limbSwing *= -1.2; float globalSpeed = 1.4f; float globalDegree = 2f; //limbSwingAmount = 0.5F; //limbSwing = tortoise.tickCount; // Head Tracking Animation if (!tortoise.isSitting()) { this.faceTarget(netHeadYaw, headPitch, 3, neck); this.faceTarget(netHeadYaw, headPitch, 3, head); } // Movement Animation flap(hand_left, globalSpeed, globalDegree * 0.6f, false, 0.5F, -0.8f, limbSwing, limbSwingAmount); walk(hand_left, globalSpeed, globalDegree * 0.3F, false, 0F, 0.8f, limbSwing, limbSwingAmount); flap(hand_right, globalSpeed, -globalDegree * 0.6f, true, 0F, 0f, limbSwing, limbSwingAmount); walk(hand_right, globalSpeed, globalDegree * 0.3F, true, 0.5F, -0.8f, limbSwing, limbSwingAmount); swing(leg_left, globalSpeed, globalDegree * 0.6f, false, 2.8F, 0.1f, limbSwing, limbSwingAmount); flap(leg_left, globalSpeed, globalDegree * 0.2f, false, 1.2F, -0.8f, limbSwing, limbSwingAmount); swing(leg_right, globalSpeed, globalDegree * 0.6f, true, 4.4F, 0.1f, limbSwing, limbSwingAmount); flap(leg_right, globalSpeed, globalDegree * 0.2f, true, 2.8F, -0.8f, limbSwing, limbSwingAmount); flap(body_main, globalSpeed / 2, globalDegree * 0.1F, false, 0, 0.1f, limbSwing / 2, limbSwingAmount); swing(body_main, globalSpeed / 2, globalDegree * 0.1f, false, 0F, 0.1f, limbSwing / 2, limbSwingAmount); // Sitting Animation if (tortoise.sitProgress != 0) { this.progressPosition(body_main, tortoise.sitProgress, 0.0F, 22.6F, 0.0F, 20); this.progressPosition(neck, tortoise.sitProgress, 0.0F, -1.1F, 0.5F, 20); this.progressRotation(neck, tortoise.sitProgress, (float) Math.toRadians(-2.61F), 0, 0, 20); this.progressPosition(head, tortoise.sitProgress, 0.0F, 0.8F, -1.7F, 20); this.progressRotation(head, tortoise.sitProgress, 0, 0, 0, 20); this.progressPosition(hand_right, tortoise.sitProgress, -1.1F, -0.1F, -5.7F, 20); this.progressRotation(hand_right, tortoise.sitProgress, (float) Math.toRadians(80.87F), (float) Math.toRadians(-60F), (float) Math.toRadians(10.43F), 20); this.progressPosition(hand_left, tortoise.sitProgress, 1.1F, -0.1F, -5.7F, 20); this.progressRotation(hand_left, tortoise.sitProgress, (float) Math.toRadians(80.87F), (float) Math.toRadians(60F), (float) Math.toRadians(-10.43F), 20); this.progressPosition(leg_right, tortoise.sitProgress, -4.4F, -0.4F, 3.9F, 20); this.progressRotation(leg_right, tortoise.sitProgress, (float) Math.toRadians(10.43F), (float) Math.toRadians(-5.22F), (float) Math.toRadians(-80.87F), 20); this.progressPosition(leg_left, tortoise.sitProgress, 4.4F, -0.4F, 3.9F, 20); this.progressRotation(leg_left, tortoise.sitProgress, (float) Math.toRadians(10.43F), (float) Math.toRadians(5.22F), (float) Math.toRadians(80.87F), 20); } } }
8,628
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
ModelRhinoCalf.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/model/ModelRhinoCalf.java
package untamedwilds.client.model; import com.github.alexthe666.citadel.client.model.AdvancedEntityModel; import com.github.alexthe666.citadel.client.model.AdvancedModelBox; import com.github.alexthe666.citadel.client.model.basic.BasicModelPart; import com.google.common.collect.ImmutableList; import net.minecraft.util.Mth; import untamedwilds.entity.mammal.EntityRhino; public class ModelRhinoCalf extends AdvancedEntityModel<EntityRhino> { public AdvancedModelBox body_main; public AdvancedModelBox leg_right; public AdvancedModelBox leg_left; public AdvancedModelBox body_torso; public AdvancedModelBox body_head; public AdvancedModelBox arm_right; public AdvancedModelBox arm_left; public AdvancedModelBox horn_back; public AdvancedModelBox ear_right; public AdvancedModelBox ear_left; public AdvancedModelBox eye_left; public AdvancedModelBox eye_right; public ModelRhinoCalf() { this.texWidth = 128; this.texHeight = 64; this.leg_left = new AdvancedModelBox(this, 79, 46); this.leg_left.setRotationPoint(-1.99F, 7.0F, 3.01F); this.leg_left.addBox(-2.0F, 0.0F, -2.0F, 4, 5, 4, 0.0F); this.eye_right = new AdvancedModelBox(this, 48, 44); this.eye_right.setRotationPoint(-2.51F, -1.5F, -3.0F); this.eye_right.addBox(0.0F, -0.5F, -1.0F, 0, 1, 2, 0.0F); this.body_head = new AdvancedModelBox(this, 97, 28); this.body_head.setRotationPoint(0.0F, -1.0F, -7.0F); this.body_head.addBox(-2.5F, -3.0F, -8.0F, 5, 6, 9, 0.0F); this.setRotateAngle(body_head, 0.6373942428283291F, 0.0F, 0.0F); this.ear_left = new AdvancedModelBox(this, 0, 37); this.ear_left.setRotationPoint(2.5F, -2.0F, -5.0F); this.ear_left.addBox(-1.0F, -3.0F, 4.5F, 2, 3, 1, 0.0F); this.setRotateAngle(ear_left, 0.0F, -0.22759093446006054F, 0.5462880558742251F); this.body_main = new AdvancedModelBox(this, 88, 44); this.body_main.setRotationPoint(0.0F, 12.2F, 3.0F); this.body_main.addBox(-4.0F, 0.0F, -7.0F, 8, 8, 12, 0.0F); this.leg_right = new AdvancedModelBox(this, 79, 46); this.leg_right.mirror = true; this.leg_right.setRotationPoint(1.99F, 7.0F, 3.01F); this.leg_right.addBox(-2.0F, 0.0F, -2.0F, 4, 5, 4, 0.0F); this.body_torso = new AdvancedModelBox(this, 79, 8); this.body_torso.setRotationPoint(0.0F, 4.0F, -5.0F); this.body_torso.addBox(-4.5F, -5.0F, -7.0F, 9, 10, 8, 0.0F); this.setRotateAngle(body_torso, -0.22759093446006054F, 0.0F, 0.0F); this.arm_right = new AdvancedModelBox(this, 79, 46); this.arm_right.mirror = true; this.arm_right.setRotationPoint(1.99F, 3.6F, -1.99F); this.arm_right.addBox(-2.0F, 0.0F, -2.0F, 4, 5, 4, 0.0F); this.setRotateAngle(arm_right, 0.22759093446006054F, 0.0F, 0.0F); this.ear_right = new AdvancedModelBox(this, 0, 37); this.ear_right.setRotationPoint(-2.5F, -2.0F, -5.0F); this.ear_right.addBox(-1.0F, -3.0F, 4.5F, 2, 3, 1, 0.0F); this.setRotateAngle(ear_right, 0.0F, 0.22759093446006054F, -0.5462880558742251F); this.arm_left = new AdvancedModelBox(this, 79, 46); this.arm_left.setRotationPoint(-1.99F, 3.6F, -1.99F); this.arm_left.addBox(-2.0F, 0.0F, -2.0F, 4, 5, 4, 0.0F); this.setRotateAngle(arm_left, 0.22759093446006054F, 0.0F, 0.0F); this.horn_back = new AdvancedModelBox(this, 11, 14); this.horn_back.setRotationPoint(0.0F, 0.0F, -5.7F); this.horn_back.addBox(-1.0F, -4.0F, -1.5F, 2, 2, 3, 0.0F); this.setRotateAngle(horn_back, 0.31869712141416456F, 0.0F, 0.0F); this.eye_left = new AdvancedModelBox(this, 48, 44); this.eye_left.setRotationPoint(2.51F, -1.5F, -3.0F); this.eye_left.addBox(0.0F, -0.5F, -1.0F, 0, 1, 2, 0.0F); this.body_main.addChild(this.leg_left); this.body_head.addChild(this.eye_right); this.body_torso.addChild(this.body_head); this.body_head.addChild(this.ear_left); this.body_main.addChild(this.leg_right); this.body_main.addChild(this.body_torso); this.body_torso.addChild(this.arm_right); this.body_head.addChild(this.ear_right); this.body_torso.addChild(this.arm_left); this.body_head.addChild(this.horn_back); this.body_head.addChild(this.eye_left); updateDefaultPose(); } @Override public Iterable<BasicModelPart> parts() { return ImmutableList.of(this.body_main); } @Override public Iterable<AdvancedModelBox> getAllParts() { return ImmutableList.of(body_main, leg_right, leg_left, body_torso, body_head, arm_right, arm_left, horn_back, ear_right, ear_left, eye_left, eye_right ); } public void setupAnim(EntityRhino rhino, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) { resetToDefaultPose(); // Breathing Animation this.body_main.setScale((float) (1F + Math.sin(ageInTicks / 20) * 0.06F), (float) (1F + Math.sin(ageInTicks / 16) * 0.06F), 1.0F); bob(body_main, 0.4F * 1.5f, 0.03F, false, ageInTicks / 20, 2); bob(arm_right, 0.4F * 1.5f, 0.03F, false, -ageInTicks / 20, 2); bob(arm_left, 0.4F * 1.5f, 0.03F, false, -ageInTicks / 20, 2); bob(leg_right, 0.4F * 1.5f, 0.03F, false, -ageInTicks / 20, 2); bob(leg_left, 0.4F * 1.5f, 0.03F, false, -ageInTicks / 20, 2); // Blinking Animation if (!rhino.shouldRenderEyes()) { this.eye_right.setRotationPoint(-1F, -2F, -2); this.eye_left.setRotationPoint(1F, -2.0F, -2.0F); } // Head Tracking Animation if (!rhino.isSleeping()) { this.faceTarget(netHeadYaw, headPitch, 2, body_head); } // Movement Animation if (rhino.canMove()) { this.arm_right.rotateAngleX = Mth.cos(limbSwing * 0.5F) * 1.4F * limbSwingAmount; this.arm_left.rotateAngleX = Mth.cos(limbSwing * 0.5F + (float) Math.PI) * 1.4F * limbSwingAmount; this.leg_left.rotateAngleX = Mth.cos(limbSwing * 0.5F + (float) Math.PI) * 1.4F * limbSwingAmount; this.leg_right.rotateAngleX = Mth.cos(limbSwing * 0.5F) * 1.4F * limbSwingAmount; } } }
6,371
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
ModelBear.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/model/ModelBear.java
package untamedwilds.client.model; import com.github.alexthe666.citadel.animation.IAnimatedEntity; import com.github.alexthe666.citadel.client.model.AdvancedEntityModel; import com.github.alexthe666.citadel.client.model.AdvancedModelBox; import com.github.alexthe666.citadel.client.model.ModelAnimator; import com.github.alexthe666.citadel.client.model.basic.BasicModelPart; import com.google.common.collect.ImmutableList; import net.minecraft.util.Mth; import untamedwilds.entity.mammal.EntityBear; public class ModelBear extends AdvancedEntityModel<EntityBear> { private final AdvancedModelBox body_main; private final AdvancedModelBox body_buttocks; private final AdvancedModelBox body_torso; private final AdvancedModelBox leg_left_1; private final AdvancedModelBox leg_right_1; private final AdvancedModelBox leg_left_2; private final AdvancedModelBox leg_left_foot; private final AdvancedModelBox leg_right_2; private final AdvancedModelBox leg_right_foot; private final AdvancedModelBox arm_left_1; private final AdvancedModelBox head_face; private final AdvancedModelBox arm_right_1; private final AdvancedModelBox arm_left_2; private final AdvancedModelBox arm_left_foot; private final AdvancedModelBox head_snout; private final AdvancedModelBox head_jaw; private final AdvancedModelBox head_eyes; private final AdvancedModelBox arm_right_2; private final AdvancedModelBox arm_right_foot; private final ModelAnimator animator; public ModelBear() { this.texWidth = 128; this.texHeight = 64; this.body_main = new AdvancedModelBox(this, 52, 0); this.body_main.setRotationPoint(0.0F, 8.5F, 0.0F); this.body_main.addBox(-5.5F, -5.5F, -5.0F, 11, 11, 10, 0.0F); this.body_torso = new AdvancedModelBox(this, 52, 21); this.body_torso.setRotationPoint(0.0F, -0.5F, -1.0F); this.body_torso.addBox(-5.0F, -5.0F, -10.0F, 10, 10, 8, 0.0F); this.setRotateAngle(body_torso, 0.136659280431156F, 0.0F, 0.0F); this.body_buttocks = new AdvancedModelBox(this, 0, 0); this.body_buttocks.setRotationPoint(0.0F, 0.0F, 3.0F); this.body_buttocks.addBox(-6.0F, -6.0F, 0.0F, 12, 12, 14, 0.0F); this.setRotateAngle(body_buttocks, -0.18203784098300857F, 0.0F, 0.0F); AdvancedModelBox body_tail = new AdvancedModelBox(this, 38, 0); body_tail.setRotationPoint(0.0F, -4.0F, 13.0F); body_tail.addBox(-1.5F, 0.0F, -1.5F, 3, 6, 3, 0.0F); this.setRotateAngle(body_tail, 0.40980330836826856F, 0.0F, 0.0F); this.head_face = new AdvancedModelBox(this, 0, 26); this.head_face.setRotationPoint(0.0F, 0.0F, -9.0F); this.head_face.addBox(-4.0F, -4.0F, -6.0F, 8, 8, 6, 0.0F); this.setRotateAngle(head_face, 0.136659280431156F, 0.0F, 0.0F); this.head_eyes = new AdvancedModelBox(this, 28, 32); this.head_eyes.setRotationPoint(0.0F, -1.5F, -6.01F); this.head_eyes.addBox(-4.0F, -0.5F, 0.0F, 8, 1, 0, 0.0F); this.head_snout = new AdvancedModelBox(this, 0, 40); this.head_snout.setRotationPoint(0.0F, -1.5F, -6.3F); this.head_snout.addBox(-2.0F, -1.0F, -4.0F, 4, 4, 5, 0.0F); this.setRotateAngle(head_snout, 0.22759093446006054F, 0.0F, 0.0F); this.head_snout.scaleX = 1.05F; AdvancedModelBox head_teeth = new AdvancedModelBox(this, 0, 50); head_teeth.setRotationPoint(0.0F, 2.0F, 0.0F); head_teeth.addBox(-2.0F, 0.0F, -4.0F, 4, 1, 4, 0.0F); this.head_jaw = new AdvancedModelBox(this, 18, 40); this.head_jaw.setRotationPoint(0.0F, 1.0F, -5.5F); this.head_jaw.addBox(-2.0F, 0.0F, -4.0F, 4, 2, 4, 0.0F); AdvancedModelBox ear_right = new AdvancedModelBox(this, 24, 28); ear_right.setRotationPoint(-3.5F, -3.0F, -3.5F); ear_right.addBox(-1.5F, -2.0F, 0.0F, 3, 3, 1, 0.0F); this.setRotateAngle(ear_right, -0.31869712141416456F, 0.31869712141416456F, -0.7285004297824331F); AdvancedModelBox ear_left = new AdvancedModelBox(this, 24, 28); ear_left.mirror = true; ear_left.setRotationPoint(3.5F, -3.0F, -3.5F); ear_left.addBox(-1.5F, -2.0F, 0.0F, 3, 3, 1, 0.0F); this.setRotateAngle(ear_left, -0.31869712141416456F, -0.31869712141416456F, 0.7285004297824331F); this.leg_left_2 = new AdvancedModelBox(this, 106, 18); this.leg_left_2.mirror = true; this.leg_left_2.setRotationPoint(0.0F, 6.0F, -2.0F); this.leg_left_2.addBox(-2.0F, 0.0F, -3.0F, 5, 6, 6, 0.0F); this.setRotateAngle(leg_left_2, 0.22759093446006054F, -0.045553093477052F, 0.18203784098300857F); this.arm_left_1 = new AdvancedModelBox(this, 35, 40); this.arm_left_1.mirror = true; this.arm_left_1.setRotationPoint(2.0F, -2.0F, -5.0F); this.arm_left_1.addBox(0.0F, 0.0F, -3.0F, 5, 10, 6, 0.0F); this.setRotateAngle(arm_left_1, 0, 0.18203784098301304F, -0.1366592804311559F); this.arm_right_1 = new AdvancedModelBox(this, 35, 40); this.arm_right_1.setRotationPoint(-2.0F, -2.0F, -5.0F); this.arm_right_1.addBox(-5.0F, 0.0F, -3.0F, 5, 10, 6, 0.0F); this.setRotateAngle(arm_right_1, 0, -0.18203784098301304F, 0.1366592804311559F); this.arm_right_2 = new AdvancedModelBox(this, 57, 40); this.arm_right_2.setRotationPoint(-1.5F, 8.0F, -0.5F); this.arm_right_2.addBox(-3.0F, 0.0F, -3.0F, 5, 8, 6, 0.0F); this.setRotateAngle(arm_right_2, -0.1366592804311541F, 0.18203784098300776F, -0.1366592804311551F); this.arm_right_foot = new AdvancedModelBox(this, 54, 54); this.arm_right_foot.setRotationPoint(-0.010000000000000009F, 7.5F, -0.99F); this.arm_right_foot.addBox(-3.0F, 0.0F, -4.0F, 5, 2, 8, 0.0F); this.setRotateAngle(arm_right_foot, 0.0F, 2.4802620430283604E-16F, 0.0F); this.leg_right_1 = new AdvancedModelBox(this, 100, 0); this.leg_right_1.setRotationPoint(-5.0F, 0.0F, 10.0F); this.leg_right_1.addBox(-3.0F, -2.0F, -6.0F, 6, 10, 8, 0.0F); this.setRotateAngle(leg_right_1, -0.045553093477052F, -0.045553093477052F, 0.18203784098300857F); this.leg_right_2 = new AdvancedModelBox(this, 106, 18); this.leg_right_2.setRotationPoint(0.0F, 6.0F, -2.0F); this.leg_right_2.addBox(-3.0F, 0.0F, -3.0F, 5, 6, 6, 0.0F); this.setRotateAngle(leg_right_2, 0.22759093446006054F, 0.045553093477052F, -0.18203784098300857F); this.leg_left_foot = new AdvancedModelBox(this, 100, 30); this.leg_left_foot.mirror = true; this.leg_left_foot.setRotationPoint(1.0F, 6.0F, 0.0F); this.leg_left_foot.addBox(-3.0F, 0.0F, -5.0F, 5, 2, 8, 0.0F); this.arm_left_2 = new AdvancedModelBox(this, 57, 40); this.arm_left_2.mirror = true; this.arm_left_2.setRotationPoint(1.5F, 8.0F, -0.5F); this.arm_left_2.addBox(-2.0F, 0.0F, -3.0F, 5, 8, 6, 0.0F); this.setRotateAngle(arm_left_2, -0.136659280431156F, -0.18203784098300857F, 0.136659280431156F); this.leg_left_1 = new AdvancedModelBox(this, 100, 0); this.leg_left_1.mirror = true; this.leg_left_1.setRotationPoint(5.0F, 0.0F, 10.0F); this.leg_left_1.addBox(-3.0F, -2.0F, -6.0F, 6, 10, 8, 0.0F); this.setRotateAngle(leg_left_1, -0.045553093477052F, 0.045553093477052F, -0.18203784098300857F); this.arm_left_foot = new AdvancedModelBox(this, 54, 54); this.arm_left_foot.mirror = true; this.arm_left_foot.setRotationPoint(0.01F, 7.5F, -0.99F); this.arm_left_foot.addBox(-2.0F, 0.0F, -4.0F, 5, 2, 8, 0.0F); this.leg_right_foot = new AdvancedModelBox(this, 100, 30); this.leg_right_foot.setRotationPoint(0.0F, 6.0F, 0.0F); this.leg_right_foot.addBox(-3.0F, 0.0F, -5.0F, 5, 2, 8, 0.0F); this.body_main.addChild(this.body_torso); this.body_main.addChild(this.body_buttocks); this.body_torso.addChild(this.arm_right_1); this.body_torso.addChild(this.arm_left_1); this.body_torso.addChild(this.head_face); this.body_buttocks.addChild(this.leg_right_1); this.body_buttocks.addChild(this.leg_left_1); this.body_buttocks.addChild(body_tail); this.head_face.addChild(ear_right); this.head_face.addChild(ear_left); this.head_face.addChild(this.head_snout); this.head_face.addChild(this.head_jaw); this.head_face.addChild(this.head_eyes); this.head_snout.addChild(head_teeth); this.leg_left_1.addChild(this.leg_left_2); this.arm_right_2.addChild(this.arm_right_foot); this.leg_right_1.addChild(this.leg_right_2); this.arm_right_1.addChild(this.arm_right_2); this.leg_left_2.addChild(this.leg_left_foot); this.arm_left_1.addChild(this.arm_left_2); this.arm_left_2.addChild(this.arm_left_foot); this.leg_right_2.addChild(this.leg_right_foot); animator = ModelAnimator.create(); updateDefaultPose(); } @Override public Iterable<BasicModelPart> parts() { return ImmutableList.of(body_main); } @Override public Iterable<AdvancedModelBox> getAllParts() { return ImmutableList.of(body_main, body_buttocks, body_torso, leg_left_1, leg_right_1, leg_left_2, leg_left_foot, leg_right_2, leg_right_foot, arm_left_1, head_face, arm_right_1, arm_left_2, arm_left_foot, head_snout, head_jaw, head_eyes, arm_right_2, arm_right_foot ); } private void animate(IAnimatedEntity entityIn) { EntityBear bear = (EntityBear) entityIn; animator.update(bear); animator.setAnimation(EntityBear.ATTACK_MAUL); animator.startKeyframe(20); animator.move(body_main, 0, -6F, 0); this.rotate(animator, body_main, -36.52F, 0, 0); animator.move(body_torso, 0, -0.5F, 0); this.rotate(animator, body_torso, 10.43F, 0, 0); this.rotate(animator, head_face, 33.91F, 0, 0); this.rotate(animator, leg_right_1, 44.35F, -2.61F, 10.43F); animator.move(leg_right_1, 0, -2F, 0); this.rotate(animator, leg_right_2, 5.22F, 2.61F, -10.43F); this.rotate(animator, leg_left_1, 44.35F, 2.61F, -10.43F); animator.move(leg_left_1, 0, -2F, 0F); this.rotate(animator, leg_left_2, 5.22F, -2.61F, 10.43F); this.rotate(animator, arm_right_1, -33.91F, 7.83F, 36.52F); this.rotate(animator, arm_right_2, -20.87F, 5.22F, -33.91F); animator.move(arm_right_foot, 0, 2, 2); this.rotate(animator, arm_right_foot, 100, 0, 0); this.rotate(animator, arm_left_1, -20.87F, -7.83F, -36.52F); this.rotate(animator, arm_left_2, -18.26F, -5.22F, 33.91F); animator.move(arm_left_foot, 0, 2, 2); this.rotate(animator, arm_left_foot, 100, 0, 0); animator.endKeyframe(); animator.startKeyframe(6); animator.move(body_torso, 0, -0.5F, 0); animator.move(body_main, 0, 4F, 0); this.rotate(animator, head_face, 23.48F, 0, 0); this.rotate(animator, arm_right_1, 0, -10.43F, 33.91F); this.rotate(animator, arm_right_2, -18.26F, 5.22F, -33.91F); this.rotate(animator, arm_left_1, 0, 10.43F, -33.91F); this.rotate(animator, arm_left_2, -18.26F, -5.22F, 33.91F); animator.move(leg_right_1, 0, -4F, 0); animator.move(leg_left_1, 0, -4F, 0); animator.move(arm_right_1, 0, -4F, 0); animator.move(arm_left_1, 0, -4F, 0); animator.endKeyframe(); animator.resetKeyframe(12); animator.setAnimation(EntityBear.ATTACK_BITE); animator.startKeyframe(8); this.rotate(animator, head_face, 0, 0, 30); this.rotate(animator, head_snout, -16, 0, 0); this.rotate(animator, head_jaw, 64, 0, 0); animator.endKeyframe(); animator.startKeyframe(8); this.rotate(animator, head_face, 0, 0, -30); animator.endKeyframe(); animator.resetKeyframe(2); animator.setAnimation(EntityBear.ATTACK_SWIPE); animator.startKeyframe(10); this.rotate(animator, body_torso, 7.83F, -10.43F, 0); this.rotate(animator, head_face, 7.83F, 10.43F, 0); this.rotate(animator, arm_right_1, -20.87F, 26.09F, 26.09F); this.rotate(animator, arm_right_2, -49.57F, 28.70F, -5.22F); animator.move(arm_right_foot, -1, 3, 0.5F); this.rotate(animator, arm_right_foot, 90F, 96.52F, 0); animator.endKeyframe(); animator.startKeyframe(8); this.rotate(animator, body_torso, 7.83F, -28.70F, 0); this.rotate(animator, head_face, 7.83F, 0, 0); this.rotate(animator, arm_right_1, -52.17F, -2.61F, 10.43F); this.rotate(animator, arm_right_2, -49.57F, 28.70F, -5.22F); animator.move(arm_right_foot, -1, 3, 0.5F); this.rotate(animator, arm_right_foot, 90F, 96.52F, 0); animator.endKeyframe(); animator.resetKeyframe(8); animator.setAnimation(EntityBear.ATTACK_POUND); animator.startKeyframe(12); this.rotate(animator, body_main, -18.26F, 0, 0); animator.move(body_main, 0, -2, 0); this.rotate(animator, body_torso, 7.83F, 5.22F, -7.83F); this.rotate(animator, head_snout, -2.61F, 0, 0); this.rotate(animator, head_jaw, 54.78F, 0, 0); this.rotate(animator, leg_right_1, 13.04F, -2.61F, 10.43F); animator.move(leg_right_1, 0, -2, 0); this.rotate(animator, leg_left_1, 13.04F, 2.61F, -10.43F); animator.move(leg_left_1, 0, -2, 0); this.rotate(animator, arm_right_1, -60F, 23.47F, 26.09F); animator.move(arm_right_1, 0, 2, 0); this.rotate(animator, arm_right_2, -46.96F, 10.43F, -7.83F); this.rotate(animator, arm_right_foot, 127.83F, 0, 0); animator.move(arm_right_foot, 0, 2, 0); this.rotate(animator, arm_left_1, -54.78F, -18.26F, -20.87F); animator.move(arm_left_1, 0, 2, 0); this.rotate(animator, arm_left_2, -46.96F, -10.43F, 7.83F); this.rotate(animator, arm_left_foot, 127.83F, 0, 0); animator.move(arm_left_foot, 0, 2, 0); animator.endKeyframe(); animator.startKeyframe(8); animator.move(body_main, 0, 2, 0); this.rotate(animator, body_torso, 18.26F, 5.22F, 2.61F); this.rotate(animator, head_face, -28.70F, 0, 5.22F); this.rotate(animator, head_snout, -2.61F, 0, 0); this.rotate(animator, head_jaw, 54.78F, 0, 0); this.rotate(animator, leg_right_1, -2.61F, -2.61F, 10.43F); //animator.move(leg_right_1, 0, 2, 0); this.rotate(animator, leg_left_1, -2.61F, 2.61F, -10.43F); //animator.move(leg_left_1, 0, 2, 0); this.rotate(animator, arm_right_1, -20.87F, -5.21F, 18.26F); //animator.move(arm_right_1, 0, 2, 0); this.rotate(animator, arm_right_2, -33.91F, 10.43F, -7.83F); this.rotate(animator, arm_right_foot, 39.13F, 15.65F, 0); animator.move(arm_right_foot, 0, -2, 0); this.rotate(animator, arm_left_1, -20.87F, 5.21F, -18.26F); //animator.move(arm_left_1, 0, 2, 0); this.rotate(animator, arm_left_2, -33.91F, -10.43F, 7.83F); this.rotate(animator, arm_left_foot, 39.13F, -15.65F, 0); animator.move(arm_left_foot, 0, -2, 0); animator.endKeyframe(); animator.resetKeyframe(8); animator.setAnimation(EntityBear.ANIMATION_ROAR); animator.startKeyframe(15); this.rotate(animator, head_face, 0, 0, 30); this.rotate(animator, head_snout, -16, 0, 0); this.rotate(animator, head_jaw, 64, 0, 0); animator.endKeyframe(); animator.startKeyframe(15); this.rotate(animator, head_face, 0, 0, -30); this.rotate(animator, head_jaw, 64, 0, 0); this.rotate(animator, head_snout, -16, 0, 0); animator.endKeyframe(); animator.startKeyframe(15); this.rotate(animator, head_face, 0, 0, 30); this.rotate(animator, head_jaw, 64, 0, 0); this.rotate(animator, head_snout, -16, 0, 0); animator.endKeyframe(); animator.resetKeyframe(5); animator.setAnimation(EntityBear.IDLE_STAND); animator.startKeyframe(24); animator.move(body_main, 0, -6F, 0); this.rotate(animator, body_main, -36.52F, 0, 0); this.rotate(animator, head_face, 33.91F, 0, 0); this.rotate(animator, leg_right_1, 44.35F, -2.61F, 10.43F); animator.move(leg_right_1, 0, -2F, 0); this.rotate(animator, leg_right_2, 5.22F, 2.61F, -10.43F); this.rotate(animator, leg_left_1, 44.35F, 2.61F, -10.43F); animator.move(leg_left_1, 0, -2F, 0F); this.rotate(animator, leg_left_2, 5.22F, -2.61F, 10.43F); animator.endKeyframe(); animator.startKeyframe(24); animator.move(body_main, 0, -6F, 6); animator.move(leg_right_1, 0, -2F, -5.20F); animator.move(leg_left_1, 0, -2F, -5.20F); this.rotate(animator, body_main, -86.09F, 0, 0); this.rotate(animator, head_face, 67.83F, 0, 0); this.rotate(animator, leg_right_1, 83.48F, -10.43F, 10.43F); this.rotate(animator, leg_left_1, 83.48F, 10.43F, -10.43F); this.rotate(animator, arm_right_1, 62.61F, -10.43F, 7.83F); this.rotate(animator, arm_right_2, -70.43F, 10.43F, -7.83F); animator.move(arm_right_foot, 0, 2, 2); this.rotate(animator, arm_right_foot, 146.09F, 0, 0); this.rotate(animator, arm_left_1, 62.61F, 10.43F, -7.83F); this.rotate(animator, arm_left_2, -70.43F, -10.43F, 7.83F); animator.move(arm_left_foot, 0, 2, 2); this.rotate(animator, arm_left_foot, 146.09F, 0, 0); animator.endKeyframe(); animator.startKeyframe(80); animator.move(body_main, 0, -6F, 7); animator.move(leg_right_1, 0, -2F, -5.20F); animator.move(leg_left_1, 0, -2F, -5.20F); this.rotate(animator, body_main, -86.09F, 0, 0); this.rotate(animator, head_face, 67.83F, 0, 0); this.rotate(animator, leg_right_1, 83.48F, -10.43F, 10.43F); this.rotate(animator, leg_left_1, 83.48F, 10.43F, -10.43F); this.rotate(animator, arm_right_1, 62.61F, -10.43F, 0); this.rotate(animator, arm_right_2, -70.43F, 10.43F, -7.83F); animator.move(arm_right_foot, 0, 2, 2); this.rotate(animator, arm_right_foot, 146.09F, 0, 0); this.rotate(animator, arm_left_1, 62.61F, 10.43F, 0); this.rotate(animator, arm_left_2, -70.43F, -10.43F, 7.83F); animator.move(arm_left_foot, 0, 2, 2); this.rotate(animator, arm_left_foot, 146.09F, 0, 0); animator.endKeyframe(); animator.resetKeyframe(20); animator.setAnimation(EntityBear.IDLE_TALK); animator.startKeyframe(10); this.rotate(animator, head_jaw, 26.09F, 0, 0); this.rotate(animator, head_face, -26.09F, 0, 0); animator.endKeyframe(); animator.resetKeyframe(10); animator.setAnimation(EntityBear.ANIMATION_EAT); animator.startKeyframe(20); animator.move(body_main, 0, 3.2F, 0); this.rotate(animator, body_main, 13.04F, 0, 0); this.rotate(animator, leg_right_1, -15.65F, -2.61F, 10.43F); this.rotate(animator, leg_left_1, -15.65F, 2.61F, -10.43F); animator.move(arm_right_1, 0, 1, 0); this.rotate(animator, arm_right_1, 0, -10.43F, 57.39F); animator.move(arm_right_2, -0.5F, -1, 0); this.rotate(animator, arm_right_2, -28.70F, 7.83F, -57.39F); animator.move(arm_left_1, 0, 1, 0); this.rotate(animator, arm_left_1, 0, 10.43F, -57.39F); animator.move(arm_left_2, 0.5F, -1, 0); this.rotate(animator, arm_left_2, -28.70F, -7.83F, 57.39F); this.rotate(animator, head_face, 23.48F, 23.48F, 0); animator.endKeyframe(); animator.startKeyframe(16); animator.move(body_main, 0, 3.2F, 0); this.rotate(animator, body_main, 13.04F, 0, 0); this.rotate(animator, leg_right_1, -15.65F, -2.61F, 10.43F); this.rotate(animator, leg_left_1, -15.65F, 2.61F, -10.43F); animator.move(arm_right_1, 0, 1, 0); this.rotate(animator, arm_right_1, 0, -10.43F, 57.39F); animator.move(arm_right_2, -0.5F, -1, 0); this.rotate(animator, arm_right_2, -28.70F, 7.83F, -57.39F); animator.move(arm_left_1, 0, 1, 0); this.rotate(animator, arm_left_1, 0, 10.43F, -57.39F); animator.move(arm_left_2, 0.5F, -1, 0); this.rotate(animator, arm_left_2, -28.70F, -7.83F, 57.39F); this.rotate(animator, head_face, 23.48F, -23.48F, 0); animator.endKeyframe(); animator.startKeyframe(16); animator.move(body_main, 0, 3.2F, 0); this.rotate(animator, body_main, 13.04F, 0, 0); this.rotate(animator, leg_right_1, -15.65F, -2.61F, 10.43F); this.rotate(animator, leg_left_1, -15.65F, 2.61F, -10.43F); animator.move(arm_right_1, 0, 1, 0); this.rotate(animator, arm_right_1, 0, -10.43F, 57.39F); animator.move(arm_right_2, -0.5F, -1, 0); this.rotate(animator, arm_right_2, -28.70F, 7.83F, -57.39F); animator.move(arm_left_1, 0, 1, 0); this.rotate(animator, arm_left_1, 0, 10.43F, -57.39F); animator.move(arm_left_2, 0.5F, -1, 0); this.rotate(animator, arm_left_2, -28.70F, -7.83F, 57.39F); this.rotate(animator, head_face, 10.43F, 23.48F, 0); animator.endKeyframe(); animator.resetKeyframe(20); } public void setupAnim(EntityBear bear, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) { this.resetToDefaultPose(); animate(bear); float globalSpeed = 2.5f; float globalDegree = 1f; limbSwingAmount = Math.min(0.3F, limbSwingAmount * 2); limbSwing *= 0.5F; if (bear.getAnimation() == EntityBear.ATTACK_MAUL || bear.getAnimation() == EntityBear.IDLE_STAND) { limbSwingAmount *= 0.5F; } // Model Parameters float shortSnout = bear.hasShortSnout() ? 0.7F : 1; this.head_snout.scaleZ = shortSnout; this.head_jaw.scaleZ = shortSnout; float torsoScale = bear.hasHump() ? 1.2F : 1; this.body_torso.scaleY = torsoScale; // Breathing Animation this.body_main.setScale((float) (1F + Math.sin(ageInTicks / 20) * 0.06F), (float) (1F + Math.sin(ageInTicks / 16) * 0.06F), 1.0F); this.body_buttocks.setScale((float) (1F + Math.sin(ageInTicks / 20) * 0.06F), (float) (1F + Math.sin(ageInTicks / 16) * 0.06F), 1.0F); this.body_torso.setScale((float) (1F + Math.sin(ageInTicks / 20) * 0.06F), (float) (torsoScale + Math.sin(ageInTicks / 16) * 0.06F), 1.0F); bob(body_main, 0.4F * globalSpeed, 0.03F, false, ageInTicks / 20, 2); bob(arm_right_1, 0.4F * globalSpeed, 0.03F, false, -ageInTicks / 20, 2); bob(arm_left_1, 0.4F * globalSpeed, 0.03F, false, -ageInTicks / 20, 2); bob(leg_right_1, 0.4F * globalSpeed, 0.03F, false, -ageInTicks / 20, 2); bob(leg_left_1, 0.4F * globalSpeed, 0.03F, false, -ageInTicks / 20, 2); // Blinking Animation if (!bear.shouldRenderEyes()) { this.head_eyes.setRotationPoint(0.0F, -1.5F, -5.01F); } this.head_eyes.setScaleY(Math.min(bear.getHealth()/bear.getMaxHealth() + 0.4F, 1.0F)); // Head Tracking Animation if (!bear.isSleeping()) { this.faceTarget(netHeadYaw, headPitch, 2, head_face); } // Pitch/Yaw handler if (bear.isInWater() && !bear.isOnGround()) { limbSwing = ageInTicks / 3; limbSwingAmount = 0.5f; this.setRotateAngle(head_face, -0.22759093446006054F, 0.0F, 0.0F); float pitch = Mth.clamp(bear.getXRot() - 10, -25F, 25.0F); this.setRotateAngle(body_main, (float) (pitch * Math.PI / 180F), 0, 0); } // Movement Animation if (bear.canMove()) { if (bear.getCurrentSpeed() > 0.08f || bear.isAngry()) { // Running Animation walk(body_main, 0.5f * globalSpeed, 0.6f * globalDegree, true, -0.5F, 0f, limbSwing, limbSwingAmount); flap(body_torso, 0.5f * globalSpeed, 0.2f * globalDegree, true, 0.5F, 0f, limbSwing, limbSwingAmount); flap(body_buttocks, 0.5f * globalSpeed, 0.2f * globalDegree, false, 0.5F, 0f, limbSwing, limbSwingAmount); flap(head_face, 0.5f * globalSpeed, 0.2f * globalDegree, false, 1F, 0f, limbSwing, limbSwingAmount); walk(arm_right_1, 0.5f * globalSpeed, 1.4f * globalDegree, false, 0F, 0f, limbSwing, limbSwingAmount); walk(arm_right_2, 0.5f * globalSpeed, 0.8f * globalDegree, false, 1F, -0.8f, limbSwing, limbSwingAmount * 1.2f); walk(arm_right_foot, 0.5f * globalSpeed, 1.4f * globalDegree, false, -3.0F, 0.75f, limbSwing, limbSwingAmount); flap(arm_right_1, 0.5f * globalSpeed, 0.2f * globalDegree, false, 2.3F, 0f, limbSwing, limbSwingAmount); walk(arm_left_1, 0.5f * globalSpeed, 1.4f * globalDegree, false, 0.3F, 0f, limbSwing, limbSwingAmount); walk(arm_left_2, 0.5f * globalSpeed, 0.8f * globalDegree, false, 1.3F, -0.8f, limbSwing, limbSwingAmount * 1.2f); walk(arm_left_foot, 0.5f * globalSpeed, 1.4f * globalDegree, false, -3.3F, 0.75f, limbSwing, limbSwingAmount); flap(arm_left_1, 0.5f * globalSpeed, 0.2f * globalDegree, false, 2.5F, 0f, limbSwing, limbSwingAmount); walk(leg_left_1, 0.5f * globalSpeed, 0.8f * globalDegree, false, 4.3F, 0f, limbSwing, limbSwingAmount); walk(leg_left_2, 0.5f * globalSpeed, 0.8f * globalDegree, false, 2.8F, 0.5f, limbSwing, limbSwingAmount); walk(leg_left_foot, 0.5f * globalSpeed, 0.8f * globalDegree, false, 1.3F, 0f, limbSwing, limbSwingAmount); walk(leg_right_1, 0.5f * globalSpeed, 0.8f * globalDegree, false, 4F, 0f, limbSwing, limbSwingAmount); } else { // Walking Animation walk(body_main, 0.5f * globalSpeed, 0.1f * globalDegree, true, -0.5F, 0f, limbSwing, limbSwingAmount); flap(body_torso, 0.5f * globalSpeed, 0.2f * globalDegree, true, 0.5F, 0f, limbSwing, limbSwingAmount); flap(body_buttocks, 0.5f * globalSpeed, 0.2f * globalDegree, false, 0.5F, 0f, limbSwing, limbSwingAmount); flap(head_face, 0.5f * globalSpeed, 0.2f * globalDegree, false, 1F, 0f, limbSwing, limbSwingAmount); walk(arm_right_1, 0.5f * globalSpeed, globalDegree, false, 0F, 0f, limbSwing, limbSwingAmount); walk(arm_right_2, 0.5f * globalSpeed, 0.6f * globalDegree, false, 1F, -0.8f, limbSwing, limbSwingAmount * 1.2f); walk(arm_right_foot, 0.5f * globalSpeed, 0.8f * globalDegree, false, -3.0F, 0.75f, limbSwing, limbSwingAmount); flap(arm_right_1, 0.5f * globalSpeed, 0.2f * globalDegree, false, 2.2F, 0f, limbSwing, limbSwingAmount); walk(arm_left_1, 0.5f * globalSpeed, globalDegree, false, 3.0F, 0f, limbSwing, limbSwingAmount); walk(arm_left_2, 0.5f * globalSpeed, 0.6f * globalDegree, false, 4F, -0.8f, limbSwing, limbSwingAmount * 1.2f); walk(arm_left_foot, 0.5f * globalSpeed, 0.8f * globalDegree, false, 1.0F, 0.75f, limbSwing, limbSwingAmount); flap(arm_left_1, 0.5f * globalSpeed, 0.2f * globalDegree, false, 5.2F, 0f, limbSwing, limbSwingAmount); walk(leg_left_1, 0.5f * globalSpeed, globalDegree, false, 1F, 0f, limbSwing, limbSwingAmount); walk(leg_left_2, 0.5f * globalSpeed, 0.8f * globalDegree, false, -0.5F, 0.5f, limbSwing, limbSwingAmount); walk(leg_left_foot, 0.5f * globalSpeed, 0.8f * globalDegree, false, -2F, 0f, limbSwing, limbSwingAmount); walk(leg_right_1, 0.5f * globalSpeed, globalDegree, false, 4F, 0f, limbSwing, limbSwingAmount); } walk(leg_right_2, 0.5f * globalSpeed, 0.8f * globalDegree, false, 2.5F, 0.5f, limbSwing, limbSwingAmount); walk(leg_right_foot, 0.5f * globalSpeed, 0.6f * globalDegree, false, 1F, 0f, limbSwing, limbSwingAmount); } // Sitting Animation if (bear.sitProgress > 0) { this.progressPosition(body_main, bear.sitProgress, 0.0F, 11.7F, 4.0F, 40); this.progressPosition(body_torso, bear.sitProgress, 0.0F, -2.5F, -1.0F, 40); this.progressPosition(body_buttocks, bear.sitProgress, 0.0F, -1.5F, 1.0F, 40); this.progressPosition(head_face, bear.sitProgress, 0.0F, -1.0F, -9.0F, 40); this.progressPosition(arm_right_1, bear.sitProgress, -2.0F, -1.0F, -5.0F, 40); this.progressPosition(arm_left_1, bear.sitProgress, 2.0F, -1.0F, -5.0F, 40); this.progressRotation(body_main, bear.sitProgress, (float)Math.toRadians(-60F), 0.0F, 0.0F, 40); this.progressRotation(body_torso, bear.sitProgress, (float)Math.toRadians(46.96F), 0.0F, 0.0F, 40); this.progressRotation(body_buttocks, bear.sitProgress, (float)Math.toRadians(-26.08F), 0.0F, 0.0F, 40); this.progressRotation(head_face, bear.sitProgress, (float)Math.toRadians(31.31F), 0.0F, 0.0F, 40); this.progressRotation(leg_right_1, bear.sitProgress, (float)Math.toRadians(-5.22F), (float)Math.toRadians(-5.22F), (float)Math.toRadians(33.9F), 40); this.progressRotation(leg_left_1, bear.sitProgress, (float)Math.toRadians(-5.22F), (float)Math.toRadians(5.22F), (float)Math.toRadians(-33.9F), 40); this.progressRotation(arm_right_1, bear.sitProgress, (float)Math.toRadians(13.04F), (float)Math.toRadians(-10.43F), (float)Math.toRadians(7.83F), 40); this.progressRotation(arm_left_1, bear.sitProgress, (float)Math.toRadians(13.04F), (float)Math.toRadians(10.43F), (float)Math.toRadians(-7.83F), 40); } // Sleeping Animation else if (bear.sleepProgress > 0) { this.progressPosition(body_main, bear.sleepProgress, -2.0F, 18.5F, 0.0F, 40); this.progressPosition(leg_right_1, bear.sleepProgress, -5.0F, 0.0F, 10.0F, 40); this.progressPosition(leg_left_1, bear.sleepProgress, 5.0F, 0.0F, 10.0F, 40); this.progressRotation(body_main, bear.sleepProgress, 0.0F, 1.5707963267948966F, 0.0F, 40); this.progressRotation(body_buttocks, bear.sleepProgress, 0.0F, 0.136659280431156F, -0.136659280431156F, 40); this.progressRotation(body_torso, bear.sleepProgress, 0.136659280431156F, -0.40980330836826856F, 0.0F, 40); this.progressRotation(head_face, bear.sleepProgress, (float)Math.toRadians(10.43F), (float)Math.toRadians(7.83F), (float)Math.toRadians(-80.87F), 40); this.progressRotation(arm_right_1, bear.sleepProgress, (float)Math.toRadians(60F), (float)Math.toRadians(78.26F), (float)Math.toRadians(7.83F), 40); this.progressRotation(arm_right_2, bear.sleepProgress, (float)Math.toRadians(80.87F), (float)Math.toRadians(-39.13F), (float)Math.toRadians(-78.26F), 40); this.progressRotation(arm_left_1, bear.sleepProgress, 0, 0, (float)Math.toRadians(-52.17F), 40); this.progressRotation(arm_left_2, bear.sleepProgress, (float)Math.toRadians(-93.91F), (float)Math.toRadians(10.43F), (float)Math.toRadians(101.74F), 40); this.progressRotation(arm_left_foot, bear.sleepProgress, (float)Math.toRadians(114.78F), 0, 0, 40); this.progressPosition(arm_left_foot, bear.sleepProgress, 0.01F, 7.5F, 0, 40); this.progressRotation(leg_right_1, bear.sleepProgress, -0.40980330836826856F, 0.045553093477052F, -1.1838568316277536F, 40); this.progressRotation(leg_right_2, bear.sleepProgress, 0.22759093446006054F, 0.045553093477052F, -0.18203784098300857F, 40); this.progressRotation(leg_left_1, bear.sleepProgress, 0.22759093446006054F, 0.045553093477052F, -1.0016444577195458F, 40); this.progressRotation(leg_left_2, bear.sleepProgress, 2.276432943376204F, -0.36425021489121656F, -0.4553564018453205F, 40); } } }
32,343
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
ModelGiantClam.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/model/ModelGiantClam.java
package untamedwilds.client.model; import com.github.alexthe666.citadel.client.model.AdvancedEntityModel; import com.github.alexthe666.citadel.client.model.AdvancedModelBox; import com.github.alexthe666.citadel.client.model.basic.BasicModelPart; import com.google.common.collect.ImmutableList; import untamedwilds.entity.mollusk.EntityGiantClam; public class ModelGiantClam extends AdvancedEntityModel<EntityGiantClam> { public AdvancedModelBox mantle; public AdvancedModelBox shell_2; public AdvancedModelBox shell_1; public ModelGiantClam() { this.texWidth = 64; this.texHeight = 64; this.shell_1 = new AdvancedModelBox(this, 0, 0); this.shell_1.setRotationPoint(0.0F, 1.0F, -3.0F); this.shell_1.addBox(-9.0F, -10.0F, -3.0F, 18, 12, 6, 0.0F); this.setRotateAngle(shell_1, 0.36425021489121656F, 0.0F, 0.0F); this.mantle = new AdvancedModelBox(this, 0, 36); this.mantle.setRotationPoint(0.0F, 22.0F, 0.0F); this.mantle.addBox(-8.0F, -6.0F, -3.0F, 16, 8, 6, 0.0F); this.shell_2 = new AdvancedModelBox(this, 0, 18); this.shell_2.setRotationPoint(0.01F, 1.0F, 3.0F); this.shell_2.addBox(-9.0F, -10.0F, -3.0F, 18, 12, 6, 0.0F); this.setRotateAngle(shell_2, -0.36425021489121656F, 0.0F, 0.0F); this.mantle.addChild(this.shell_1); this.mantle.addChild(this.shell_2); updateDefaultPose(); } @Override public Iterable<BasicModelPart> parts() { return ImmutableList.of(this.mantle); } @Override public Iterable<AdvancedModelBox> getAllParts() { return ImmutableList.of(this.mantle, this.shell_1, this.shell_2); } public void setupAnim(EntityGiantClam clam, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) { this.resetToDefaultPose(); // Breathing Animation this.mantle.setScale((float) (1F + Math.sin(ageInTicks / 20) * 0.08F), (float) (1F + Math.sin(ageInTicks / 16) * 0.08F), 1.0F); walk(shell_1, 0.2f, 0.1f, true, 0.5F, 0f, ageInTicks / 20, 0.5F); walk(shell_2, 0.2f, 0.1f, false, 0.5F, 0f, ageInTicks / 20, 0.5F); // Opening/Closing Animation this.progressRotation(shell_1, clam.closeProgress, 0, 0, 0, 200); this.progressRotation(shell_2, clam.closeProgress, 0, 0, 0, 200); } }
2,388
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
ModelKingCrab.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/model/ModelKingCrab.java
package untamedwilds.client.model; import com.github.alexthe666.citadel.animation.IAnimatedEntity; import com.github.alexthe666.citadel.client.model.AdvancedEntityModel; import com.github.alexthe666.citadel.client.model.AdvancedModelBox; import com.github.alexthe666.citadel.client.model.ModelAnimator; import com.github.alexthe666.citadel.client.model.basic.BasicModelPart; import com.google.common.collect.ImmutableList; import untamedwilds.entity.arthropod.EntityKingCrab; import untamedwilds.entity.mammal.EntityCamel; /** * MobKingCrab - RayTrace082 * Created using Tabula 7.0.0 */ public class ModelKingCrab extends AdvancedEntityModel<EntityKingCrab> { public AdvancedModelBox body_main; public AdvancedModelBox body_spikes; public AdvancedModelBox arm_left_1; public AdvancedModelBox arm_r_1; public AdvancedModelBox leg_l_11; public AdvancedModelBox leg_l_21; public AdvancedModelBox leg_l_31; public AdvancedModelBox leg_r_11; public AdvancedModelBox leg_r_21; public AdvancedModelBox leg_r_31; public AdvancedModelBox head; public AdvancedModelBox shape69; public AdvancedModelBox arm_left_1_spikes; public AdvancedModelBox arm_left_2; public AdvancedModelBox arm_left_2_spikes; public AdvancedModelBox arm_left_pincer_1; public AdvancedModelBox arm_left_pincer_2; public AdvancedModelBox arm_r_1_spikes; public AdvancedModelBox arm_r_2; public AdvancedModelBox arm_r_2_spikes; public AdvancedModelBox arm_r_pincer_1; public AdvancedModelBox arm_r_pincer_2; public AdvancedModelBox leg_l_11_spikes; public AdvancedModelBox leg_l_12; public AdvancedModelBox leg_l_12_spikes; public AdvancedModelBox leg_l_21_spikes; public AdvancedModelBox leg_l_22; public AdvancedModelBox leg_l_22_spikes; public AdvancedModelBox leg_l_31_spikes; public AdvancedModelBox leg_l_32; public AdvancedModelBox leg_l_32_spikes; public AdvancedModelBox leg_r_11_spikes; public AdvancedModelBox leg_r_12; public AdvancedModelBox leg_r_12_spikes; public AdvancedModelBox leg_r_21_spikes; public AdvancedModelBox leg_r_22; public AdvancedModelBox leg_r_22_spikes; public AdvancedModelBox leg_r_31_spikes; public AdvancedModelBox leg_r_32; public AdvancedModelBox leg_r_32_spikes; private final ModelAnimator animator; public ModelKingCrab() { this.texWidth = 64; this.texHeight = 32; this.head = new AdvancedModelBox(this, 0, 27); this.head.setRotationPoint(0.0F, -0.49F, -3.5F); this.head.addBox(-2.0F, -1.5F, -2.0F, 4, 3, 2, 0.0F); this.leg_l_12_spikes = new AdvancedModelBox(this, 20, 14); this.leg_l_12_spikes.setRotationPoint(1.0F, 3.3F, 0.0F); this.leg_l_12_spikes.addBox(0.0F, -3.0F, 0.0F, 2, 9, 0, 0.0F); this.leg_l_32 = new AdvancedModelBox(this, 12, 14); this.leg_l_32.setRotationPoint(0.0F, 7.0F, 0.0F); this.leg_l_32.addBox(-1.0F, 0.0F, -1.0F, 2, 9, 2, 0.0F); this.setRotateAngle(leg_l_32, 0.36425021489121656F, 0.091106186954104F, 1.3658946726107624F); this.arm_r_1_spikes = new AdvancedModelBox(this, 48, 16); this.arm_r_1_spikes.setRotationPoint(0.0F, -0.7F, 0.0F); this.arm_r_1_spikes.addBox(-6.0F, -2.0F, 0.0F, 6, 2, 0, 0.0F); this.arm_left_2 = new AdvancedModelBox(this, 32, 18); this.arm_left_2.setRotationPoint(6.0F, 0.0F, 0.0F); this.arm_left_2.addBox(0.0F, -1.0F, -1.0F, 4, 2, 2, 0.0F); this.setRotateAngle(arm_left_2, -0.045553093477052F, 0.0F, 2.367539130330308F); this.leg_l_21_spikes = new AdvancedModelBox(this, 8, 14); this.leg_l_21_spikes.setRotationPoint(1.0F, 1.3F, 0.0F); this.leg_l_21_spikes.addBox(0.0F, -2.0F, 0.0F, 2, 7, 0, 0.0F); this.leg_l_11 = new AdvancedModelBox(this, 0, 14); this.leg_l_11.setRotationPoint(4.0F, 1.0F, -1.0F); this.leg_l_11.addBox(-1.0F, 0.0F, -1.0F, 2, 7, 2, 0.0F); this.setRotateAngle(leg_l_11, -0.40980330836826856F, -0.091106186954104F, -1.7756979809790308F); this.leg_l_21 = new AdvancedModelBox(this, 0, 14); this.leg_l_21.setRotationPoint(4.0F, 1.0F, 1.0F); this.leg_l_21.addBox(-1.0F, 0.0F, -1.0F, 2, 7, 2, 0.0F); this.setRotateAngle(leg_l_21, 0.136659280431156F, 0.22759093446006054F, -1.9577358219620393F); this.arm_r_2 = new AdvancedModelBox(this, 32, 18); this.arm_r_2.mirror = true; this.arm_r_2.setRotationPoint(-6.0F, 0.2F, 0.0F); this.arm_r_2.addBox(-4.0F, -1.0F, -1.0F, 4, 2, 2, 0.0F); this.setRotateAngle(arm_r_2, -0.045553093477052F, 0.0F, -2.4586453172844123F); this.leg_l_12 = new AdvancedModelBox(this, 12, 14); this.leg_l_12.setRotationPoint(0.0F, 7.0F, 0.0F); this.leg_l_12.addBox(-1.0F, 0.0F, -1.0F, 2, 9, 2, 0.0F); this.setRotateAngle(leg_l_12, 0.0F, 0.091106186954104F, 1.3203415791337103F); this.arm_left_2_spikes = new AdvancedModelBox(this, 48, 18); this.arm_left_2_spikes.setRotationPoint(0.0F, -0.7F, 0.0F); this.arm_left_2_spikes.addBox(0.0F, -2.0F, 0.0F, 4, 2, 0, 0.0F); this.leg_l_32_spikes = new AdvancedModelBox(this, 20, 14); this.leg_l_32_spikes.setRotationPoint(1.0F, 3.3F, 0.0F); this.leg_l_32_spikes.addBox(0.0F, -3.0F, 0.0F, 2, 9, 0, 0.0F); this.arm_left_1 = new AdvancedModelBox(this, 32, 14); this.arm_left_1.setRotationPoint(2.5F, 1.0F, -3.0F); this.arm_left_1.addBox(0.0F, -1.0F, -1.0F, 6, 2, 2, 0.0F); this.setRotateAngle(arm_left_1, 0.8651597102135892F, 1.0927506446736497F, 0.8196066167365371F); this.arm_left_1_spikes = new AdvancedModelBox(this, 48, 16); this.arm_left_1_spikes.setRotationPoint(0.0F, -0.7F, 0.0F); this.arm_left_1_spikes.addBox(0.0F, -2.0F, 0.0F, 6, 2, 0, 0.0F); this.arm_left_pincer_2 = new AdvancedModelBox(this, 44, 22); this.arm_left_pincer_2.setRotationPoint(4.0F, 0.0F, 0.0F); this.arm_left_pincer_2.addBox(0.0F, 0.0F, -1.0F, 4, 1, 2, 0.0F); this.setRotateAngle(arm_left_pincer_2, 1.5707963267948966F, 0.0F, 0.0F); this.leg_l_22_spikes = new AdvancedModelBox(this, 20, 14); this.leg_l_22_spikes.setRotationPoint(1.0F, 3.3F, 0.0F); this.leg_l_22_spikes.addBox(0.0F, -3.0F, 0.0F, 2, 9, 0, 0.0F); this.leg_l_31_spikes = new AdvancedModelBox(this, 8, 14); this.leg_l_31_spikes.setRotationPoint(1.0F, 1.3F, 0.0F); this.leg_l_31_spikes.addBox(0.0F, -2.0F, 0.0F, 2, 7, 0, 0.0F); this.arm_left_pincer_1 = new AdvancedModelBox(this, 32, 22); this.arm_left_pincer_1.setRotationPoint(4.0F, 0.0F, 0.0F); this.arm_left_pincer_1.addBox(0.0F, -1.0F, -1.0F, 4, 1, 2, 0.0F); this.setRotateAngle(arm_left_pincer_1, 1.5707963267948966F, 0.22759093446006054F, 0.0F); this.arm_r_pincer_2 = new AdvancedModelBox(this, 44, 22); this.arm_r_pincer_2.mirror = true; this.arm_r_pincer_2.setRotationPoint(-4.0F, 0.0F, 0.0F); this.arm_r_pincer_2.addBox(-4.0F, 0.0F, -1.0F, 4, 1, 2, 0.0F); this.setRotateAngle(arm_r_pincer_2, 1.5707963267948966F, 0.0F, 0.0F); this.arm_r_1 = new AdvancedModelBox(this, 32, 14); this.arm_r_1.mirror = true; this.arm_r_1.setRotationPoint(-2.5F, 1.0F, -3.0F); this.arm_r_1.addBox(-6.0F, -1.0F, -1.0F, 6, 2, 2, 0.0F); this.setRotateAngle(arm_r_1, 0.40980330836826856F, -0.9560913642424937F, -0.36425021489121656F); this.arm_r_pincer_1 = new AdvancedModelBox(this, 32, 22); this.arm_r_pincer_1.mirror = true; this.arm_r_pincer_1.setRotationPoint(-4.0F, 0.0F, 0.0F); this.arm_r_pincer_1.addBox(-4.0F, -1.0F, -1.0F, 4, 1, 2, 0.0F); this.setRotateAngle(arm_r_pincer_1, 1.5707963267948966F, -0.22759093446006054F, 0.0F); this.arm_r_2_spikes = new AdvancedModelBox(this, 48, 18); this.arm_r_2_spikes.setRotationPoint(0.0F, -0.7F, 0.0F); this.arm_r_2_spikes.addBox(-4.0F, -2.0F, 0.0F, 4, 2, 0, 0.0F); this.body_main = new AdvancedModelBox(this, 0, 0); this.body_main.setRotationPoint(0.0F, 18.0F, 0.0F); this.body_main.addBox(-4.0F, -2.0F, -3.5F, 8, 4, 7, 0.0F); this.setRotateAngle(body_main, -0.136659280431156F, 0.0F, 0.0F); this.leg_l_11_spikes = new AdvancedModelBox(this, 8, 14); this.leg_l_11_spikes.setRotationPoint(1.0F, 1.3F, 0.0F); this.leg_l_11_spikes.addBox(0.0F, -2.0F, 0.0F, 2, 7, 0, 0.0F); this.shape69 = new AdvancedModelBox(this, 14, 24); this.shape69.setRotationPoint(0.0F, 1.5F, 3.0F); this.shape69.addBox(-3.0F, -1.0F, -4.0F, 6, 3, 5, 0.0F); this.setRotateAngle(shape69, 0.31869712141416456F, 0.0F, 0.0F); this.leg_l_22 = new AdvancedModelBox(this, 12, 14); this.leg_l_22.setRotationPoint(0.0F, 7.0F, 0.0F); this.leg_l_22.addBox(-1.0F, 0.0F, -1.0F, 2, 9, 2, 0.0F); this.setRotateAngle(leg_l_22, 0.045553093477052F, 0.18203784098300857F, 1.593485607070823F); this.body_spikes = new AdvancedModelBox(this, 18, 0); this.body_spikes.setRotationPoint(0.0F, -1.99F, -0.5F); this.body_spikes.addBox(-6.0F, 0.0F, -6.0F, 12, 0, 12, 0.0F); this.leg_l_31 = new AdvancedModelBox(this, 0, 14); this.leg_l_31.setRotationPoint(2.5F, 1.0F, 3.0F); this.leg_l_31.addBox(-1.0F, 0.0F, -1.0F, 2, 7, 2, 0.0F); this.setRotateAngle(leg_l_31, 0.5462880558742251F, 0.38379790251355306F, -1.7756979809790308F); this.leg_r_31 = new AdvancedModelBox(this, 0, 14); this.leg_r_31.mirror = true; this.leg_r_31.setRotationPoint(-2.5F, 1.0F, 3.0F); this.leg_r_31.addBox(-1.0F, 0.0F, -1.0F, 2, 7, 2, 0.0F); this.setRotateAngle(leg_r_31, 0.5462880558742251F, -0.40980330836826856F, 1.7756979809790308F); this.leg_r_32 = new AdvancedModelBox(this, 12, 14); this.leg_r_32.mirror = true; this.leg_r_32.setRotationPoint(0.0F, 7.0F, 0.0F); this.leg_r_32.addBox(-1.0F, 0.0F, -1.0F, 2, 9, 2, 0.0F); this.setRotateAngle(leg_r_32, 0.0F, 0.091106186954104F, -1.3658946726107624F); this.leg_r_11 = new AdvancedModelBox(this, 0, 14); this.leg_r_11.mirror = true; this.leg_r_11.setRotationPoint(-4.0F, 1.0F, -1.0F); this.leg_r_11.addBox(-1.0F, 0.0F, -1.0F, 2, 7, 2, 0.0F); this.setRotateAngle(leg_r_11, -0.40980330836826856F, 0.091106186954104F, 1.7756979809790308F); this.leg_r_22 = new AdvancedModelBox(this, 12, 14); this.leg_r_22.mirror = true; this.leg_r_22.setRotationPoint(0.0F, 7.0F, 0.0F); this.leg_r_22.addBox(-1.0F, 0.0F, -1.0F, 2, 9, 2, 0.0F); this.setRotateAngle(leg_r_22, 0.045553093477052F, -0.18203784098300857F, -1.593485607070823F); this.leg_r_11_spikes = new AdvancedModelBox(this, 8, 14); this.leg_r_11_spikes.mirror = true; this.leg_r_11_spikes.setRotationPoint(-1.0F, 1.3F, 0.0F); this.leg_r_11_spikes.addBox(-2.0F, -2.0F, 0.0F, 2, 7, 0, 0.0F); this.leg_r_22_spikes = new AdvancedModelBox(this, 20, 14); this.leg_r_22_spikes.mirror = true; this.leg_r_22_spikes.setRotationPoint(-1.0F, 3.3F, 0.0F); this.leg_r_22_spikes.addBox(-2.0F, -3.0F, 0.0F, 2, 9, 0, 0.0F); this.leg_r_12 = new AdvancedModelBox(this, 12, 14); this.leg_r_12.mirror = true; this.leg_r_12.setRotationPoint(0.0F, 7.0F, 0.0F); this.leg_r_12.addBox(-1.0F, 0.0F, -1.0F, 2, 9, 2, 0.0F); this.setRotateAngle(leg_r_12, 0.0F, 0.091106186954104F, -1.3203415791337103F); this.leg_r_12_spikes = new AdvancedModelBox(this, 20, 14); this.leg_r_12_spikes.mirror = true; this.leg_r_12_spikes.setRotationPoint(-1.0F, 3.3F, 0.0F); this.leg_r_12_spikes.addBox(-2.0F, -3.0F, 0.0F, 2, 9, 0, 0.0F); this.leg_r_32_spikes = new AdvancedModelBox(this, 20, 14); this.leg_r_32_spikes.mirror = true; this.leg_r_32_spikes.setRotationPoint(-1.0F, 3.3F, 0.0F); this.leg_r_32_spikes.addBox(-2.0F, -3.0F, 0.0F, 2, 9, 0, 0.0F); this.leg_r_21 = new AdvancedModelBox(this, 0, 14); this.leg_r_21.mirror = true; this.leg_r_21.setRotationPoint(-4.0F, 1.0F, 1.0F); this.leg_r_21.addBox(-1.0F, 0.0F, -1.0F, 2, 7, 2, 0.0F); this.setRotateAngle(leg_r_21, 0.045553093477052F, -0.045553093477052F, 1.9577358219620393F); this.leg_r_21_spikes = new AdvancedModelBox(this, 8, 14); this.leg_r_21_spikes.mirror = true; this.leg_r_21_spikes.setRotationPoint(-1.0F, 1.3F, 0.0F); this.leg_r_21_spikes.addBox(-2.0F, -2.0F, 0.0F, 2, 7, 0, 0.0F); this.leg_r_31_spikes = new AdvancedModelBox(this, 8, 14); this.leg_r_31_spikes.mirror = true; this.leg_r_31_spikes.setRotationPoint(-1.0F, 1.3F, 0.0F); this.leg_r_31_spikes.addBox(-2.0F, -2.0F, 0.0F, 2, 7, 0, 0.0F); this.leg_r_32.addChild(this.leg_r_32_spikes); this.body_main.addChild(this.leg_r_21); this.body_main.addChild(this.head); this.leg_r_11.addChild(this.leg_r_12); this.leg_r_11.addChild(this.leg_r_11_spikes); this.leg_l_12.addChild(this.leg_l_12_spikes); this.leg_l_31.addChild(this.leg_l_32); this.leg_r_21.addChild(this.leg_r_22); this.arm_r_1.addChild(this.arm_r_1_spikes); this.arm_left_1.addChild(this.arm_left_2); this.body_main.addChild(this.leg_r_31); this.leg_l_21.addChild(this.leg_l_21_spikes); this.body_main.addChild(this.leg_l_11); this.body_main.addChild(this.leg_l_21); this.leg_r_21.addChild(this.leg_r_21_spikes); this.arm_r_1.addChild(this.arm_r_2); this.leg_l_11.addChild(this.leg_l_12); this.arm_left_2.addChild(this.arm_left_2_spikes); this.leg_l_32.addChild(this.leg_l_32_spikes); this.body_main.addChild(this.arm_left_1); this.arm_left_1.addChild(this.arm_left_1_spikes); this.arm_left_2.addChild(this.arm_left_pincer_2); this.leg_l_22.addChild(this.leg_l_22_spikes); this.leg_l_31.addChild(this.leg_l_31_spikes); this.arm_left_2.addChild(this.arm_left_pincer_1); this.arm_r_2.addChild(this.arm_r_pincer_2); this.body_main.addChild(this.arm_r_1); this.leg_r_22.addChild(this.leg_r_22_spikes); this.arm_r_2.addChild(this.arm_r_pincer_1); this.leg_r_31.addChild(this.leg_r_32); this.leg_r_31.addChild(this.leg_r_31_spikes); this.leg_r_12.addChild(this.leg_r_12_spikes); this.arm_r_2.addChild(this.arm_r_2_spikes); this.leg_l_11.addChild(this.leg_l_11_spikes); this.body_main.addChild(this.shape69); this.body_main.addChild(this.leg_r_11); this.leg_l_21.addChild(this.leg_l_22); this.body_main.addChild(this.body_spikes); this.body_main.addChild(this.leg_l_31); animator = ModelAnimator.create(); updateDefaultPose(); } @Override public Iterable<BasicModelPart> parts() { return ImmutableList.of(this.body_main); } @Override public Iterable<AdvancedModelBox> getAllParts() { return ImmutableList.of(body_main, body_spikes, arm_left_1, arm_r_1, leg_l_11, leg_l_21, leg_l_31, leg_r_11, leg_r_21, leg_r_31, head, shape69, arm_left_1_spikes, arm_left_2, arm_left_2_spikes, arm_left_pincer_1, arm_left_pincer_2, arm_r_1_spikes, arm_r_2, arm_r_2_spikes, arm_r_pincer_1, arm_r_pincer_2, leg_l_11_spikes, leg_l_12, leg_l_12_spikes, leg_l_21_spikes, leg_l_22, leg_l_22_spikes, leg_l_31_spikes, leg_l_32, leg_l_32_spikes, leg_r_11_spikes, leg_r_12, leg_r_12_spikes, leg_r_21_spikes, leg_r_22, leg_r_22_spikes, leg_r_31_spikes, leg_r_32, leg_r_32_spikes ); } private void animate(IAnimatedEntity entityIn) { animator.update(entityIn); animator.setAnimation(EntityKingCrab.EAT_RIGHT); animator.startKeyframe(16); this.rotate(animator, arm_r_1, 26.09F, 13.04F, -49.56F); this.rotate(animator, arm_r_2, 0, 5.22F, 54.78F); animator.endKeyframe(); animator.startKeyframe(8); this.rotate(animator, arm_r_1, 26.09F, 13.04F, -49.56F); this.rotate(animator, arm_r_2, 0, 5.22F, 54.78F); this.rotate(animator, arm_r_pincer_1, 0, 13.04F, 0); animator.endKeyframe(); animator.startKeyframe(16); this.rotate(animator, arm_r_1, -88.70F, 2.61F, 39.13F); this.rotate(animator, arm_r_2, 0, -13.04F, -30F); this.rotate(animator, arm_r_pincer_1, 0, 13.04F, 0); animator.endKeyframe(); animator.resetKeyframe(16); animator.setAnimation(EntityKingCrab.EAT_LEFT); animator.startKeyframe(16); this.rotate(animator, arm_left_1, 26.09F, -13.04F, 49.56F); this.rotate(animator, arm_left_2, 0, -5.22F, -54.78F); animator.endKeyframe(); animator.startKeyframe(8); this.rotate(animator, arm_left_1, 26.09F, -13.04F, 49.56F); this.rotate(animator, arm_left_2, 0, -5.22F, -54.78F); this.rotate(animator, arm_left_pincer_1, 0, -13.04F, 0); animator.endKeyframe(); animator.startKeyframe(16); this.rotate(animator, arm_left_1, -88.70F, -2.61F, -39.13F); this.rotate(animator, arm_left_2, 0, 13.04F, 30F); this.rotate(animator, arm_left_pincer_1, 0, -13.04F, 0); animator.endKeyframe(); animator.resetKeyframe(16); animator.setAnimation(EntityKingCrab.EAT_BOTH); animator.startKeyframe(16); this.rotate(animator, arm_left_1, 26.09F, -13.04F, 49.56F); this.rotate(animator, arm_left_2, 0, -5.22F, -54.78F); animator.endKeyframe(); animator.startKeyframe(8); this.rotate(animator, arm_left_1, 26.09F, -13.04F, 49.56F); this.rotate(animator, arm_left_2, 0, -5.22F, -54.78F); this.rotate(animator, arm_left_pincer_1, 0, -13.04F, 0); animator.endKeyframe(); animator.startKeyframe(16); this.rotate(animator, arm_left_1, -88.70F, -2.61F, -39.13F); this.rotate(animator, arm_left_2, 0, 13.04F, 30F); this.rotate(animator, arm_left_pincer_1, 0, -13.04F, 0); this.rotate(animator, arm_r_1, 26.09F, 13.04F, -49.56F); this.rotate(animator, arm_r_2, 0, 5.22F, 54.78F); animator.endKeyframe(); animator.startKeyframe(8); this.rotate(animator, arm_r_1, 26.09F, 13.04F, -49.56F); this.rotate(animator, arm_r_2, 0, 5.22F, 54.78F); this.rotate(animator, arm_r_pincer_1, 0, 13.04F, 0); animator.endKeyframe(); animator.startKeyframe(16); this.rotate(animator, arm_r_1, -88.70F, 2.61F, 39.13F); this.rotate(animator, arm_r_2, 0, -13.04F, -30F); this.rotate(animator, arm_r_pincer_1, 0, 13.04F, 0); animator.endKeyframe(); animator.resetKeyframe(16); } public void setupAnim(EntityKingCrab tarantula, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) { resetToDefaultPose(); animate(tarantula); limbSwing = ageInTicks; limbSwingAmount = Math.min(0.4F, limbSwingAmount); float globalSpeed = 1.2f; //float globalSpeed = limbSwing * 0.0001F * 1.2f; //limbSwingAmount = 0.4F; float globalDegree = 1.4f; bob(body_main, 0.4F * 1.5f, 0.05F, false, ageInTicks / 20, 5); bob(leg_l_11, 0.4F * 1.5f, 0.05F, false, -ageInTicks / 20, 5); bob(leg_r_11, 0.4F * 1.5f, 0.05F, false, -ageInTicks / 20, 5); bob(leg_l_21, 0.4F * 1.5f, 0.05F, false, -ageInTicks / 20, 5); bob(leg_r_21, 0.4F * 1.5f, 0.05F, false, -ageInTicks / 20, 5); bob(leg_l_31, 0.4F * 1.5f, 0.05F, false, -ageInTicks / 20, 5); bob(leg_r_31, 0.4F * 1.5f, 0.05F, false, -ageInTicks / 20, 5); animateArthropodLeg(leg_l_11, leg_l_12, globalSpeed * 0.2F, globalDegree, 1, -limbSwing, limbSwingAmount); animateArthropodLeg(leg_l_21, leg_l_22, globalSpeed * 0.2F, globalDegree, 3, -limbSwing, limbSwingAmount); animateArthropodLeg(leg_l_31, leg_l_32, globalSpeed * 0.2F, globalDegree, 5, -limbSwing, limbSwingAmount); animateArthropodLeg(leg_r_11, leg_r_12, globalSpeed * 0.2F, globalDegree, 0, -limbSwing, limbSwingAmount); animateArthropodLeg(leg_r_21, leg_r_22, globalSpeed * 0.2F, globalDegree, 2, -limbSwing, limbSwingAmount); animateArthropodLeg(leg_r_31, leg_r_32, globalSpeed * 0.2F, globalDegree, 4, -limbSwing, limbSwingAmount); } private void animateArthropodLeg(AdvancedModelBox limb_1, AdvancedModelBox limb_2, float speed, float degree, int offset, float limbSwing, float limbSwingAmount) { swing(limb_1, speed, degree * 1.2f, false, offset, 0.1f, limbSwing, limbSwingAmount); flap(limb_1, speed, degree * 0.8f, true, offset + 1.5F, 0.2f, limbSwing, limbSwingAmount); flap(limb_2, speed, degree * 1f, true, offset + 1.5F, 0f, limbSwing, limbSwingAmount); } }
21,111
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
ModelCatfish.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/model/ModelCatfish.java
package untamedwilds.client.model; import com.github.alexthe666.citadel.client.model.AdvancedEntityModel; import com.github.alexthe666.citadel.client.model.AdvancedModelBox; import com.github.alexthe666.citadel.client.model.basic.BasicModelPart; import com.google.common.collect.ImmutableList; import untamedwilds.UntamedWilds; import untamedwilds.entity.fish.EntityCatfish; public class ModelCatfish extends AdvancedEntityModel<EntityCatfish> { public AdvancedModelBox body_main; public AdvancedModelBox head_main; public AdvancedModelBox body_bottom; public AdvancedModelBox head_main_1; public AdvancedModelBox fin_dorsal; public AdvancedModelBox fin_pectoral_left; public AdvancedModelBox fin_pelvic_left; public AdvancedModelBox fin_pelvic_right; public AdvancedModelBox fin_pectoral_right; public AdvancedModelBox whisker_left; public AdvancedModelBox whisker_right; public AdvancedModelBox body_tail; public AdvancedModelBox fin_anal; public AdvancedModelBox fin_dorsal_1; public AdvancedModelBox fin_caudal; public ModelCatfish() { this.texWidth = 64; this.texHeight = 32; this.fin_dorsal = new AdvancedModelBox(this, 30, 13); this.fin_dorsal.setRotationPoint(0.0F, -1.3F, 1.0F); this.fin_dorsal.addBox(0.0F, -8.0F, -3.0F, 0, 8, 5, 0.0F); this.setRotateAngle(fin_dorsal, -0.4553564018453205F, 0.0F, 0.0F); this.fin_pelvic_right = new AdvancedModelBox(this, 40, 15); this.fin_pelvic_right.setRotationPoint(-2.0F, 1.0F, 2.0F); this.fin_pelvic_right.addBox(0.0F, 0.0F, -1.5F, 0, 6, 3, 0.0F); this.setRotateAngle(fin_pelvic_right, 0.36425021489121656F, 0.136659280431156F, 0.5462880558742251F); this.body_main = new AdvancedModelBox(this, 0, 0); this.body_main.setRotationPoint(0.0F, 23.0F, -2.0F); this.body_main.addBox(-2.5F, -2.5F, -3.0F, 5, 4, 7, 0.0F); this.head_main_1 = new AdvancedModelBox(this, 24, 9); this.head_main_1.setRotationPoint(0.0F, 1.6F, -3.0F); this.head_main_1.addBox(-3.0F, -2.0F, 0.0F, 6, 2, 6, 0.0F); this.setRotateAngle(head_main_1, -0.091106186954104F, 0.0F, 0.0F); this.head_main = new AdvancedModelBox(this, 24, 0); this.head_main.setRotationPoint(0.0F, -0.4F, -5.0F); this.head_main.addBox(-3.0F, -2.0F, -3.0F, 6, 3, 6, 0.0F); this.head_main.scaleX = 1.1F; this.setRotateAngle(head_main, 0.136659280431156F, 0.0F, 0.0F); this.fin_caudal = new AdvancedModelBox(this, 0, 18); this.fin_caudal.setRotationPoint(0.0F, 0.0F, 1.2F); this.fin_caudal.addBox(0.0F, 0.0F, 0.0F, 0, 7, 7, 0.0F); this.setRotateAngle(fin_caudal, 0.7853981633974483F, 0.0F, 0.0F); this.fin_pectoral_right = new AdvancedModelBox(this, 12, 6); this.fin_pectoral_right.setRotationPoint(-2.5F, 0.0F, -2.2F); this.fin_pectoral_right.addBox(0.0F, -1.5F, 0.0F, 0, 3, 6, 0.0F); this.setRotateAngle(fin_pectoral_right, 0.0F, -0.5462880558742251F, 0.0F); this.fin_anal = new AdvancedModelBox(this, 20, 16); this.fin_anal.setRotationPoint(0.0F, 0.4F, 2.0F); this.fin_anal.addBox(0.0F, 0.0F, -3.0F, 0, 6, 10, 0.0F); this.setRotateAngle(fin_anal, 0.22759093446006054F, 0.0F, 0.0F); this.whisker_right = new AdvancedModelBox(this, 42, 0); this.whisker_right.mirror = true; this.whisker_right.setRotationPoint(-2.6F, -1.0F, -2.0F); this.whisker_right.addBox(-6.0F, 0.0F, -0.5F, 6, 0, 1, 0.0F); this.setRotateAngle(whisker_right, 0.0F, -0.27314402793711257F, -0.4553564018453205F); this.whisker_left = new AdvancedModelBox(this, 42, 0); this.whisker_left.mirror = true; this.whisker_left.setRotationPoint(2.6F, -1.0F, -2.0F); this.whisker_left.addBox(0.0F, 0.0F, -0.5F, 6, 0, 1, 0.0F); this.setRotateAngle(whisker_left, 0.0F, 0.27314402793711257F, 0.4553564018453205F); this.fin_pelvic_left = new AdvancedModelBox(this, 40, 15); this.fin_pelvic_left.mirror = true; this.fin_pelvic_left.setRotationPoint(2.0F, 1.0F, 2.0F); this.fin_pelvic_left.addBox(0.0F, 0.0F, -1.5F, 0, 6, 3, 0.0F); this.setRotateAngle(fin_pelvic_left, 0.36425021489121656F, -0.136659280431156F, -0.5462880558742251F); this.body_bottom = new AdvancedModelBox(this, 0, 11); this.body_bottom.setRotationPoint(0.0F, 0.0F, 4.0F); this.body_bottom.addBox(-1.5F, -2.5F, 0.0F, 3, 4, 6, 0.0F); this.fin_dorsal_1 = new AdvancedModelBox(this, 19, 14); this.fin_dorsal_1.setRotationPoint(0.0F, 0.1F, 3.0F); this.fin_dorsal_1.addBox(0.0F, -5.0F, -3.0F, 0, 5, 4, 0.0F); this.setRotateAngle(fin_dorsal_1, -1.0016444577195458F, 0.0F, 0.0F); this.fin_pectoral_left = new AdvancedModelBox(this, 12, 6); this.fin_pectoral_left.mirror = true; this.fin_pectoral_left.setRotationPoint(2.5F, 0.0F, -2.2F); this.fin_pectoral_left.addBox(0.0F, -1.5F, 0.0F, 0, 3, 6, 0.0F); this.setRotateAngle(fin_pectoral_left, 0.0F, 0.5590024477811982F, 0.0F); this.body_tail = new AdvancedModelBox(this, 18, 0); this.body_tail.setRotationPoint(0.0F, -1.0F, 6.0F); this.body_tail.addBox(-1.0F, -1.5F, 0.0F, 2, 3, 3, 0.0F); this.body_main.addChild(this.fin_dorsal); this.body_main.addChild(this.fin_pelvic_right); this.head_main.addChild(this.head_main_1); this.body_main.addChild(this.head_main); this.body_tail.addChild(this.fin_caudal); this.body_main.addChild(this.fin_pectoral_right); this.body_bottom.addChild(this.fin_anal); this.head_main.addChild(this.whisker_right); this.head_main.addChild(this.whisker_left); this.body_main.addChild(this.fin_pelvic_left); this.body_main.addChild(this.body_bottom); this.body_bottom.addChild(this.fin_dorsal_1); this.body_main.addChild(this.fin_pectoral_left); this.body_bottom.addChild(this.body_tail); updateDefaultPose(); } @Override public Iterable<BasicModelPart> parts() { return ImmutableList.of(this.body_main); } @Override public Iterable<AdvancedModelBox> getAllParts() { return ImmutableList.of(body_main, head_main, body_bottom, head_main_1, fin_dorsal, fin_pectoral_left, fin_pelvic_left, fin_pelvic_right, fin_pectoral_right, whisker_left, whisker_right, body_tail, fin_anal, fin_dorsal_1, fin_caudal); } public void setupAnim(EntityCatfish catfish, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) { resetToDefaultPose(); float globalSpeed = 0.5f; float globalDegree = 1f; if (!catfish.isInWater()) { this.setRotateAngle(body_main, 0, 0, (float)Math.toRadians(90D)); } AdvancedModelBox[] bodyParts = new AdvancedModelBox[]{head_main, body_main, body_tail, fin_caudal}; chainSwing(bodyParts, globalSpeed, globalDegree * 1.1f, -5, limbSwing, limbSwingAmount); float speed = Math.min((float)catfish.getCurrentSpeed(), 0.08F); swing(fin_pectoral_left, globalSpeed, globalDegree * 0.8f, false, 0, 0.2f, ageInTicks / 6, 0.6F); swing(fin_pectoral_right, globalSpeed, globalDegree * 0.8f, true, 0, 0.2f, ageInTicks / 6, 0.6F); this.setRotateAngle(whisker_right, 0.0F, -0.27314402793711257F + catfish.whisker_offset.getA(), -0.4553564018453205F + catfish.whisker_offset.getB()); this.setRotateAngle(whisker_left, 0.0F, 0.27314402793711257F - catfish.whisker_offset.getA(), 0.4553564018453205F - catfish.whisker_offset.getB()); } }
7,744
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
ModelTrevally.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/model/ModelTrevally.java
package untamedwilds.client.model; import com.github.alexthe666.citadel.client.model.AdvancedEntityModel; import com.github.alexthe666.citadel.client.model.AdvancedModelBox; import com.github.alexthe666.citadel.client.model.basic.BasicModelPart; import com.google.common.collect.ImmutableList; import untamedwilds.entity.fish.EntityTrevally; public class ModelTrevally extends AdvancedEntityModel<EntityTrevally> { public AdvancedModelBox body_main; public AdvancedModelBox head_main; public AdvancedModelBox body_tail; public AdvancedModelBox fin_top; public AdvancedModelBox fin_bottom; public AdvancedModelBox fin_dorsal; public AdvancedModelBox head_mouth; public AdvancedModelBox fin_right; public AdvancedModelBox fin_left; public AdvancedModelBox fin_tail; public ModelTrevally() { this.texWidth = 64; this.texHeight = 32; this.head_main = new AdvancedModelBox(this, 0, 18); this.head_main.setRotationPoint(0.0F, 1.57F, -2.53F); this.head_main.addBox(-1.5F, -3.5F, -5.0F, 3, 6, 5, 0.0F); this.head_main.scaleX = 1.1F; this.setRotateAngle(head_main, -0.5462880558742251F, 0.0F, 0.0F); this.body_tail = new AdvancedModelBox(this, 18, 0); this.body_tail.setRotationPoint(0.0F, 0.0F, 5.0F); this.body_tail.addBox(-1.0F, -2.0F, 0.0F, 2, 4, 3, 0.0F); this.fin_tail = new AdvancedModelBox(this, 28, 8); this.fin_tail.setRotationPoint(0.0F, 0.0F, 0.7F); this.fin_tail.addBox(0.0F, 0.0F, 0.0F, 0, 8, 8, 0.0F); this.setRotateAngle(fin_tail, 0.7853981633974483F, 0.0F, 0.0F); this.fin_right = new AdvancedModelBox(this, 16, 20); this.fin_right.setRotationPoint(-1.4F, -0.5F, -1.0F); this.fin_right.addBox(0.0F, -1.0F, 0.0F, 0, 2, 6, 0.0F); this.setRotateAngle(fin_right, 0.5918411493512771F, -0.27314402793711257F, -0.18203784098300857F); this.fin_bottom = new AdvancedModelBox(this, 28, 2); this.fin_bottom.setRotationPoint(0.0F, 2.0F, 5.0F); this.fin_bottom.addBox(0.0F, -1.0F, -3.0F, 0, 8, 6, 0.0F); this.setRotateAngle(fin_bottom, 0.5918411493512771F, 0.0F, 0.0F); this.body_main = new AdvancedModelBox(this, 0, 0); this.body_main.setRotationPoint(0.0F, 18.0F, 0.0F); this.body_main.addBox(-1.5F, -4.0F, -5.0F, 3, 8, 10, 0.0F); this.fin_dorsal = new AdvancedModelBox(this, 28, 21); this.fin_dorsal.setRotationPoint(0.0F, -3.5F, -1.4F); this.fin_dorsal.addBox(0.0F, -3.0F, -0.5F, 0, 3, 3, 0.0F); this.setRotateAngle(fin_dorsal, -0.6373942428283291F, 0.0F, 0.0F); this.fin_left = new AdvancedModelBox(this, 16, 20); this.fin_left.setRotationPoint(1.4F, -0.5F, -1.0F); this.fin_left.addBox(0.0F, -1.0F, 0.0F, 0, 2, 6, 0.0F); this.setRotateAngle(fin_left, 0.5918411493512771F, 0.27314402793711257F, 0.18203784098300857F); this.fin_top = new AdvancedModelBox(this, 28, -6); this.fin_top.setRotationPoint(0.0F, -2.0F, 5.0F); this.fin_top.addBox(0.0F, -7.0F, -3.0F, 0, 8, 6, 0.0F); this.setRotateAngle(fin_top, -0.5918411493512771F, 0.0F, 0.0F); this.head_mouth = new AdvancedModelBox(this, 12, 18); this.head_mouth.setRotationPoint(0.0F, 2.4F, -1.8F); this.head_mouth.addBox(-1.5F, 0.0F, -3.0F, 3, 1, 4, 0.0F); this.setRotateAngle(head_mouth, 0.091106186954104F, 0.0F, 0.0F); this.body_main.addChild(this.head_main); this.body_main.addChild(this.body_tail); this.body_tail.addChild(this.fin_tail); this.head_main.addChild(this.fin_right); this.body_main.addChild(this.fin_bottom); this.body_main.addChild(this.fin_dorsal); this.head_main.addChild(this.fin_left); this.body_main.addChild(this.fin_top); this.head_main.addChild(this.head_mouth); updateDefaultPose(); } @Override public Iterable<BasicModelPart> parts() { return ImmutableList.of(this.body_main); } @Override public Iterable<AdvancedModelBox> getAllParts() { return ImmutableList.of( body_main, head_main, body_tail, fin_top, fin_bottom, fin_dorsal, head_mouth, fin_right, fin_left, fin_tail ); } public void setupAnim(EntityTrevally trevally, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) { resetToDefaultPose(); float globalSpeed = 0.5f; float globalDegree = 1f; if (!trevally.isInWater()) { this.setRotateAngle(body_main, 0, 0, (float)Math.toRadians(90D)); } AdvancedModelBox[] bodyParts = new AdvancedModelBox[]{head_main, body_main, body_tail, fin_tail}; chainSwing(bodyParts, globalSpeed, globalDegree * 1.1f, -5, limbSwing, limbSwingAmount); float speed = Math.min((float)trevally.getCurrentSpeed(), 0.08F); this.fin_dorsal.rotateAngleX = this.fin_dorsal.defaultRotationX + speed * -8; this.fin_top.rotateAngleX = this.fin_top.defaultRotationX + speed * -3; this.fin_bottom.rotateAngleX = this.fin_bottom.defaultRotationX + speed * 3; swing(fin_left, globalSpeed, globalDegree * 0.8f, false, 0, 0.2f, ageInTicks / 6, 0.6F); swing(fin_right, globalSpeed, globalDegree * 0.8f, true, 0, 0.2f, ageInTicks / 6, 0.6F); } }
5,486
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
MonsterSpitter.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/model/MonsterSpitter.java
package untamedwilds.client.model; import com.github.alexthe666.citadel.animation.IAnimatedEntity; import com.github.alexthe666.citadel.client.model.AdvancedEntityModel; import com.github.alexthe666.citadel.client.model.AdvancedModelBox; import com.github.alexthe666.citadel.client.model.ModelAnimator; import com.github.alexthe666.citadel.client.model.basic.BasicModelPart; import com.google.common.collect.ImmutableList; import net.minecraft.util.Mth; import untamedwilds.entity.relict.EntitySpitter; public class MonsterSpitter extends AdvancedEntityModel<EntitySpitter> { public AdvancedModelBox body_main; public AdvancedModelBox body_abdomen; public AdvancedModelBox arm_right_upper; public AdvancedModelBox arm_left_upper; public AdvancedModelBox head_neck; public AdvancedModelBox back_sail; public AdvancedModelBox leg_right_upper; public AdvancedModelBox leg_left_upper; public AdvancedModelBox leg_right_lower; public AdvancedModelBox arm_right_claw; public AdvancedModelBox leg_left_lower; public AdvancedModelBox arm_left_claw; public AdvancedModelBox arm_right_lower; public AdvancedModelBox arm_right_claw_1; public AdvancedModelBox arm_left_lower; public AdvancedModelBox arm_left_claw_1; public AdvancedModelBox head_snout; public AdvancedModelBox head_tube; private final ModelAnimator animator; public MonsterSpitter() { this.texWidth = 128; this.texHeight = 64; this.head_tube = new AdvancedModelBox(this, 0, 47); this.head_tube.setRotationPoint(0.0F, -1.5F, -4.0F); this.head_tube.addBox(-1.5F, -1.5F, -8.0F, 3, 3, 8, 0.0F); this.body_abdomen = new AdvancedModelBox(this, 40, 0); this.body_abdomen.setRotationPoint(0.0F, -1.0F, 6.0F); this.body_abdomen.addBox(-3.5F, -4.0F, 0.0F, 7, 6, 10, 0.0F); this.leg_left_lower = new AdvancedModelBox(this, 58, 46); this.leg_left_lower.mirror = true; this.leg_left_lower.setRotationPoint(1.0F, 4.0F, 3.0F); this.leg_left_lower.addBox(-1.5F, 0.0F, -1.5F, 3, 9, 3, 0.0F); this.setRotateAngle(leg_left_lower, -0.136659280431156F, 0.0F, 0.136659280431156F); this.arm_right_lower = new AdvancedModelBox(this, 42, 33); this.arm_right_lower.setRotationPoint(-1.0F, 7.0F, 0.5F); this.arm_right_lower.addBox(-1.5F, 0.0F, -1.5F, 3, 8, 3, 0.0F); this.setRotateAngle(arm_right_lower, -0.5009094953223726F, 0.0F, -0.091106186954104F); this.leg_right_upper = new AdvancedModelBox(this, 38, 46); this.leg_right_upper.setRotationPoint(-3.0F, -0.5F, 6.0F); this.leg_right_upper.addBox(-3.0F, -2.0F, -3.0F, 4, 8, 6, 0.0F); this.setRotateAngle(leg_right_upper, -0.27314402793711257F, 0.0F, 0.18203784098300857F); this.body_main = new AdvancedModelBox(this, 0, 0); this.body_main.setRotationPoint(0.0F, 11.5F, -4.5F); this.body_main.addBox(-3.5F, -5.0F, -6.0F, 7, 8, 12, 0.0F); this.setRotateAngle(body_main, -0.091106186954104F, 0.0F, 0.0F); this.arm_left_upper = new AdvancedModelBox(this, 42, 20); this.arm_left_upper.mirror = true; this.arm_left_upper.setRotationPoint(2.5F, -2.5F, -0.5F); this.arm_left_upper.addBox(-1.0F, 0.0F, -2.5F, 4, 8, 5, 0.0F); this.setRotateAngle(arm_left_upper, 0.27314402793711257F, -0.0F, -0.091106186954104F); this.head_neck = new AdvancedModelBox(this, 0, 22); this.head_neck.setRotationPoint(0.0F, -2.0F, -4.0F); this.head_neck.addBox(-2.0F, -2.5F, -8.0F, 4, 5, 8, 0.0F); this.setRotateAngle(head_neck, -1.7301448875F, 0.0F, 0.0F); this.head_snout = new AdvancedModelBox(this, 0, 36); this.head_snout.setRotationPoint(0.0F, 0.2F, -7.0F); this.head_snout.addBox(-2.5F, -3.0F, -4.0F, 5, 4, 7, 0.0F); this.setRotateAngle(head_snout, 1.957735822F, 0.0F, 0.0F); this.arm_left_claw = new AdvancedModelBox(this, 54, 40); this.arm_left_claw.setRotationPoint(0.0F, 6.8F, -2.0F); this.arm_left_claw.addBox(-1.0F, 0.0F, -4.0F, 2, 2, 4, 0.0F); this.setRotateAngle(arm_left_claw, 1.6845918F, 0.0F, 0.0F); this.arm_right_claw = new AdvancedModelBox(this, 54, 40); this.arm_right_claw.mirror = true; this.arm_right_claw.setRotationPoint(0.0F, 6.8F, -2.0F); this.arm_right_claw.addBox(-1.0F, 0.0F, -4.0F, 2, 2, 4, 0.0F); this.setRotateAngle(arm_right_claw, 1.6845918F, 0.0F, 0.0F); this.leg_left_upper = new AdvancedModelBox(this, 38, 46); this.leg_left_upper.mirror = true; this.leg_left_upper.setRotationPoint(3.0F, -0.5F, 6.0F); this.leg_left_upper.addBox(-1.0F, -2.0F, -3.0F, 4, 8, 6, 0.0F); this.setRotateAngle(leg_left_upper, -0.27314402793711257F, -0.0F, -0.18203784098300857F); this.arm_left_lower = new AdvancedModelBox(this, 42, 33); this.arm_left_lower.mirror = true; this.arm_left_lower.setRotationPoint(1.0F, 7.0F, 0.5F); this.arm_left_lower.addBox(-1.5F, 0.0F, -1.5F, 3, 8, 3, 0.0F); this.setRotateAngle(arm_left_lower, -0.5009094953223726F, 0.0F, 0.091106186954104F); this.back_sail = new AdvancedModelBox(this, 78, 40); this.back_sail.setRotationPoint(0.0F, -4.0F, 11.0F); this.back_sail.addBox(-2.5F, -10.0F, -5.0F, 5, 12, 12, 0.0F); this.setRotateAngle(back_sail, -0.31869712141416456F, 0.0F, 0.0F); this.arm_right_claw_1 = new AdvancedModelBox(this, 54, 34); this.arm_right_claw_1.setRotationPoint(0.0F, 6.0F, -2.5F); this.arm_right_claw_1.addBox(-1.0F, 0.0F, -4.0F, 2, 2, 4, 0.0F); this.setRotateAngle(arm_right_claw_1, 1.548107F, 0.0F, 0.0F); this.arm_left_claw_1 = new AdvancedModelBox(this, 54, 34); this.arm_left_claw_1.mirror = true; this.arm_left_claw_1.setRotationPoint(0.0F, 6.0F, -2.5F); this.arm_left_claw_1.addBox(-1.0F, 0.0F, -4.0F, 2, 2, 4, 0.0F); this.setRotateAngle(arm_left_claw_1, 1.548107F, 0.0F, 0.0F); this.arm_right_upper = new AdvancedModelBox(this, 42, 20); this.arm_right_upper.setRotationPoint(-2.5F, -2.5F, -0.5F); this.arm_right_upper.addBox(-3.0F, 0.0F, -2.5F, 4, 8, 5, 0.0F); this.setRotateAngle(arm_right_upper, 0.27314402793711257F, 0.0F, 0.091106186954104F); this.leg_right_lower = new AdvancedModelBox(this, 58, 46); this.leg_right_lower.setRotationPoint(-1.0F, 4.0F, 3.0F); this.leg_right_lower.addBox(-1.5F, 0.0F, -1.5F, 3, 9, 3, 0.0F); this.setRotateAngle(leg_right_lower, -0.136659280431156F, 0.0F, -0.136659280431156F); this.head_snout.addChild(this.head_tube); this.body_main.addChild(this.body_abdomen); this.leg_left_upper.addChild(this.leg_left_lower); this.arm_right_upper.addChild(this.arm_right_lower); this.body_abdomen.addChild(this.leg_right_upper); this.body_main.addChild(this.arm_left_upper); this.body_main.addChild(this.head_neck); this.head_neck.addChild(this.head_snout); this.leg_left_lower.addChild(this.arm_left_claw); this.leg_right_lower.addChild(this.arm_right_claw); this.body_abdomen.addChild(this.leg_left_upper); this.arm_left_upper.addChild(this.arm_left_lower); this.body_main.addChild(this.back_sail); this.arm_right_lower.addChild(this.arm_right_claw_1); this.arm_left_lower.addChild(this.arm_left_claw_1); this.body_main.addChild(this.arm_right_upper); this.leg_right_upper.addChild(this.leg_right_lower); animator = ModelAnimator.create(); updateDefaultPose(); } @Override public Iterable<BasicModelPart> parts() { return ImmutableList.of(this.body_main); } @Override public Iterable<AdvancedModelBox> getAllParts() { return ImmutableList.of( body_main, body_abdomen, arm_right_upper, arm_left_upper, head_neck, back_sail, leg_right_upper, leg_left_upper, leg_right_lower, arm_right_claw, leg_left_lower, arm_left_claw, arm_right_lower, arm_right_claw_1, arm_left_lower, arm_left_claw_1, head_snout, head_tube ); } private void animate(IAnimatedEntity entityIn) { EntitySpitter spitter = (EntitySpitter) entityIn; animator.update(spitter); animator.setAnimation(EntitySpitter.ATTACK_MAUL_RIGHT); animator.startKeyframe(8); animator.move(body_main, 0, -0.7F, 0); this.rotate(animator, body_main, -5.22F, -10.43F, 7.83F); this.rotate(animator, body_abdomen, -5.22F, 10.43F, -7.83F); this.rotate(animator, head_snout, 31.30F, -13.04F, 23.48F); animator.move(arm_right_upper, -1, -1, 0); this.rotate(animator, arm_right_upper, -78.26F, 33.91F, -10.43F); this.rotate(animator, arm_right_lower, -62.61F, -5.22F, -5.22F); animator.move(arm_left_upper, 0, 0.9F, 0); this.rotate(animator, arm_left_upper, 23.48F, 10.43F, -10.43F); this.rotate(animator, leg_right_upper, -2.61F, 0, 2.61F); this.rotate(animator, leg_left_upper, -2.61F, 0, -2.61F); animator.endKeyframe(); animator.startKeyframe(6); animator.move(body_main, 0, 1.9F, 0); this.rotate(animator, body_main, 13.04F, -10.43F, 7.83F); this.rotate(animator, body_abdomen, -23.48F, 10.43F, -7.83F); this.rotate(animator, head_snout, 39.13F, 7.83F, 0); this.rotate(animator, head_neck, -54.78F, 0, 0); animator.move(arm_right_upper, 0, 0, -2); this.rotate(animator, arm_right_upper, -73.04F, 13.04F, -10.43F); this.rotate(animator, arm_right_lower, -13.04F, -5.22F, -5.22F); animator.move(arm_left_upper, 0, -1.2F, 0); this.rotate(animator, arm_left_upper, 15.65F, 10.43F, -10.43F); this.rotate(animator, arm_left_lower, -60, 0, 5.22F); this.rotate(animator, leg_right_upper, -2.61F, 0, 2.61F); this.rotate(animator, leg_left_upper, -2.61F, 0, -2.61F); animator.endKeyframe(); animator.resetKeyframe(8); animator.setAnimation(EntitySpitter.ATTACK_MAUL_LEFT); animator.startKeyframe(8); animator.move(body_main, 0, -0.7F, 0); this.rotate(animator, body_main, -5.22F, 10.43F, -7.83F); this.rotate(animator, body_abdomen, -5.22F, -10.43F, 7.83F); this.rotate(animator, head_snout, 31.30F, 13.04F, -23.48F); animator.move(arm_left_upper, -1, -1, 0); this.rotate(animator, arm_left_upper, -78.26F, -33.91F, 10.43F); this.rotate(animator, arm_left_lower, -62.61F, 5.22F, 5.22F); animator.move(arm_right_upper, 0, 0.9F, 0); this.rotate(animator, arm_right_upper, 23.48F, -10.43F, 10.43F); this.rotate(animator, leg_left_upper, -2.61F, 0, -2.61F); this.rotate(animator, leg_right_upper, -2.61F, 0, 2.61F); animator.endKeyframe(); animator.startKeyframe(6); animator.move(body_main, 0, 1.9F, 0); this.rotate(animator, body_main, 13.04F, 10.43F, -7.83F); this.rotate(animator, body_abdomen, -23.48F, -10.43F, 7.83F); this.rotate(animator, head_snout, 39.13F, -7.83F, 0); this.rotate(animator, head_neck, -54.78F, 0, 0); animator.move(arm_left_upper, 0, 0, -2); this.rotate(animator, arm_left_upper, -73.04F, -13.04F, 10.43F); this.rotate(animator, arm_left_lower, -13.04F, 5.22F, 5.22F); animator.move(arm_right_upper, 0, -1.2F, 0); this.rotate(animator, arm_right_upper, 15.65F, -10.43F, 10.43F); this.rotate(animator, arm_right_lower, -60, 0, -5.22F); this.rotate(animator, leg_left_upper, -2.61F, 0, -2.61F); this.rotate(animator, leg_right_upper, -2.61F, 0, 2.61F); animator.endKeyframe(); animator.resetKeyframe(8); animator.setAnimation(EntitySpitter.ATTACK_SPIT); animator.startKeyframe(6); this.rotate(animator, head_neck, -46.96F, 0, 0); animator.move(head_snout, 0, 2, 0); this.rotate(animator, head_snout, 15.65F, 0, 0); animator.endKeyframe(); animator.startKeyframe(4); this.rotate(animator, head_neck, 46.96F, 0, 0); animator.move(head_snout, 0, 2, 0); this.rotate(animator, head_snout, -28.70F, 0, 0); animator.move(head_snout, 0, 0, 1.5F); this.rotate(animator, head_snout, -28.70F, 0, 0); this.rotate(animator, head_snout, 36.52F, 0, 0); animator.endKeyframe(); animator.resetKeyframe(6); animator.setAnimation(EntitySpitter.IDLE_WATCH); animator.startKeyframe(20); animator.move(body_main, 0, -6F, 0); this.rotate(animator, body_main, -36.52F, 0, 0); this.rotate(animator, head_neck, 41.74F, 0, 0); animator.move(head_snout, 0, -1F, -2F); this.rotate(animator, head_snout, -20F, 0, 46.96F); this.rotate(animator, arm_left_upper, 41.74F, 0, -5.22F); this.rotate(animator, arm_right_upper, 41.74F, 0, 5.22F); this.rotate(animator, leg_left_upper, 41.74F, 0, 0); this.rotate(animator, leg_right_upper, 41.74F, 0, 0); animator.endKeyframe(); animator.startKeyframe(20); animator.move(body_main, 0, -6F, 0); this.rotate(animator, body_main, -36.52F, 0, 0); this.rotate(animator, head_neck, 41.74F, 0, 0); animator.move(head_snout, 0, -1F, -2F); this.rotate(animator, head_snout, -20F, 0, -54.78F); this.rotate(animator, arm_left_upper, 41.74F, 0, -5.22F); this.rotate(animator, arm_right_upper, 41.74F, 0, 5.22F); this.rotate(animator, leg_left_upper, 41.74F, 0, 0); this.rotate(animator, leg_right_upper, 41.74F, 0, 0); animator.endKeyframe(); animator.startKeyframe(20); animator.move(body_main, 0, -6F, 0); this.rotate(animator, body_main, -36.52F, 0, 0); this.rotate(animator, head_neck, 41.74F, 0, 0); animator.move(head_snout, 0, -1F, -2F); this.rotate(animator, head_snout, -20F, 0, 39.13F); this.rotate(animator, arm_left_upper, 41.74F, 0, -5.22F); this.rotate(animator, arm_right_upper, 41.74F, 0, 5.22F); this.rotate(animator, leg_left_upper, 41.74F, 0, 0); this.rotate(animator, leg_right_upper, 41.74F, 0, 0); animator.endKeyframe(); animator.resetKeyframe(20); animator.setAnimation(EntitySpitter.IDLE_TALK); animator.startKeyframe(20); this.rotate(animator, head_neck, 41.74F, 0, 0); //animator.move(head_snout, 0, -1F, -2F); this.rotate(animator, head_snout, -60F, 0, 10.43F); animator.endKeyframe(); animator.resetKeyframe(20); animator.setAnimation(EntitySpitter.ANIMATION_EAT); animator.startKeyframe(20); animator.move(body_main, 0, 2F, 1F); this.rotate(animator, body_main, 13.05F, 0, 0); this.rotate(animator, head_neck, 65.22F, 0, 0); this.rotate(animator, leg_left_upper, -20.87F, 0, 0); this.rotate(animator, leg_right_upper, -20.87F, 0, 0); animator.move(arm_left_upper, 0, -1F, 0); this.rotate(animator, arm_left_upper, -13.04F, 0, -10.43F); animator.move(arm_right_upper, 0, -1F, 0); this.rotate(animator, arm_right_upper, -13.04F, 0, 10.43F); animator.endKeyframe(); animator.startKeyframe(20); animator.move(body_main, 0, 2F, 1F); this.rotate(animator, body_main, 13.05F, 0, 0); this.rotate(animator, head_neck, 65.22F, 20.87F, 10.43F); this.rotate(animator, leg_left_upper, -20.87F, 0, 0); this.rotate(animator, leg_right_upper, -20.87F, 0, 0); animator.move(arm_left_upper, 0, -1F, 0); this.rotate(animator, arm_left_upper, -13.04F, 0, -10.43F); animator.move(arm_right_upper, 0, -1F, 0); this.rotate(animator, arm_right_upper, -13.04F, 0, 10.43F); animator.endKeyframe(); animator.startKeyframe(20); animator.move(body_main, 0, 2F, 1F); this.rotate(animator, body_main, 13.05F, 0, 0); this.rotate(animator, head_neck, 65.22F, -20.87F, -10.43F); this.rotate(animator, leg_left_upper, -20.87F, 0, 0); this.rotate(animator, leg_right_upper, -20.87F, 0, 0); animator.move(arm_left_upper, 0, -1F, 0); this.rotate(animator, arm_left_upper, -13.04F, 0, -10.43F); animator.move(arm_right_upper, 0, -1F, 0); this.rotate(animator, arm_right_upper, -13.04F, 0, 10.43F); animator.endKeyframe(); animator.resetKeyframe(20); } public void setupAnim(EntitySpitter spitter, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) { this.resetToDefaultPose(); animate(spitter); float globalSpeed = 2.4f; float globalDegree = 1f; limbSwingAmount = Math.min(0.6F, limbSwingAmount * 2); limbSwing *= 0.5F; // Model Parameters // Breathing Animation final double scaleX = Math.sin(ageInTicks / 20F); final double scaleY = Math.sin(ageInTicks / 16); this.body_main.setScale((float) (1F + scaleX * 0.08F), (float) (1F + scaleY * 0.06F), 1.0F); this.body_abdomen.setScale((float) (1F + scaleX * 0.06F), (float) (1F + scaleY * 0.06F), 1.0F); bob(body_main, 0.4F * globalSpeed, 0.03F, false, ageInTicks / 20, 2); bob(head_neck, 0.4F * globalSpeed, 0.03F, false, ageInTicks / 20, 2); bob(arm_right_upper, 0.4F * globalSpeed, 0.03F, false, -ageInTicks / 20, 2); bob(arm_left_upper, 0.4F * globalSpeed, 0.03F, false, -ageInTicks / 20, 2); bob(leg_right_upper, 0.4F * globalSpeed, 0.03F, false, -ageInTicks / 20, 2); bob(leg_left_upper, 0.4F * globalSpeed, 0.03F, false, -ageInTicks / 20, 2); // Blinking Animation // Head Tracking Animation if (!spitter.isSleeping() && spitter.getAnimation() != EntitySpitter.IDLE_WATCH) { this.faceTarget(netHeadYaw, headPitch, 2, head_neck); this.faceTarget(netHeadYaw, headPitch, 2, head_snout); } // Pitch/Yaw handler if (spitter.isInWater() && !spitter.isOnGround()) { limbSwing = ageInTicks / 3; limbSwingAmount = 0.5f; this.body_main.rotationPointY += 4; // Model offset to make the Big Cat "sink" in water (while not drowning) this.setRotateAngle(head_neck, -0.18203784098300857F, 0.0F, 0.0F); float pitch = Mth.clamp(spitter.getXRot() - 10, -25F, 25.0F); this.setRotateAngle(body_main, (float) (pitch * Math.PI / 180F), 0, 0); } // Movement Animation if (spitter.canMove() && spitter.getAnimation() != EntitySpitter.IDLE_WATCH) { if (spitter.getCurrentSpeed() > 0.1f || spitter.isAngry()) { // Running animation bob(body_main, 0.5F * globalSpeed, 0.5F, false, limbSwing, limbSwingAmount); walk(body_main, 0.5f * globalSpeed, 0.5f * globalDegree, true, 0.5F, 0f, limbSwing, limbSwingAmount); walk(head_neck, 0.5f * globalSpeed, -0.5f * globalDegree, true, 0.5F, 0f, limbSwing, limbSwingAmount); walk(body_abdomen, 0.5f * globalSpeed, 0.3f * globalDegree, false, 0.5F, 0f, limbSwing, limbSwingAmount); bob(arm_right_upper, 0.5F * globalSpeed, 0.8F, false, limbSwing, limbSwingAmount); walk(arm_right_upper, 0.5f * globalSpeed, globalDegree, true, 0F, 0f, limbSwing, limbSwingAmount); walk(arm_right_lower, 0.5f * globalSpeed, 0.6f * globalDegree, true, 0.2F, 0.2f, limbSwing, limbSwingAmount); bob(arm_left_upper, 0.5F * globalSpeed, 0.8F, false, limbSwing, limbSwingAmount); walk(arm_left_upper, 0.5f * globalSpeed, globalDegree, true, 0.6F, 0f, limbSwing, limbSwingAmount); walk(arm_left_lower, 0.5f * globalSpeed, 0.6f * globalDegree, true, 0.8F, 0.2f, limbSwing, limbSwingAmount); bob(leg_right_upper, 0.5F * globalSpeed, 0.8F, false, limbSwing, limbSwingAmount); walk(leg_right_upper, 0.5f * globalSpeed, globalDegree, true, 1.4F, 0f, limbSwing, limbSwingAmount); walk(leg_right_lower, 0.5f * globalSpeed, 0.6f * globalDegree, true, 1.6F, 0.2f, limbSwing, limbSwingAmount); bob(leg_left_upper, 0.5F * globalSpeed, 0.8F, false, limbSwing, limbSwingAmount); walk(leg_left_upper, 0.5f * globalSpeed, globalDegree, true, 2F, 0f, limbSwing, limbSwingAmount); walk(leg_left_lower, 0.5f * globalSpeed, 0.6f * globalDegree, true, 2.2F, 0.2f, limbSwing, limbSwingAmount); } else { // Walking Animation bob(arm_right_upper, 0.5F * globalSpeed, 0.8F, false, limbSwing, limbSwingAmount); walk(arm_right_upper, 0.5f * globalSpeed, globalDegree, true, 0F, 0f, limbSwing, limbSwingAmount); walk(arm_right_lower, 0.5f * globalSpeed, 0.6f * globalDegree, true, 0.2F, 0.2f, limbSwing, limbSwingAmount); bob(arm_left_upper, 0.5F * globalSpeed, 0.8F, false, limbSwing, limbSwingAmount); walk(arm_left_upper, 0.5f * globalSpeed, globalDegree, true, 2.4F, 0f, limbSwing, limbSwingAmount); walk(arm_left_lower, 0.5f * globalSpeed, 0.6f * globalDegree, true, 2.6F, 0.2f, limbSwing, limbSwingAmount); bob(leg_right_upper, 0.5F * globalSpeed, 0.8F, false, limbSwing, limbSwingAmount); walk(leg_right_upper, 0.5f * globalSpeed, globalDegree, true, 1F, 0f, limbSwing, limbSwingAmount); walk(leg_right_lower, 0.5f * globalSpeed, 0.6f * globalDegree, true, 1.2F, 0.2f, limbSwing, limbSwingAmount); bob(leg_left_upper, 0.5F * globalSpeed, 0.8F, false, limbSwing, limbSwingAmount); walk(leg_left_upper, 0.5f * globalSpeed, globalDegree, true, 3.4F, 0f, limbSwing, limbSwingAmount); walk(leg_left_lower, 0.5f * globalSpeed, 0.6f * globalDegree, true, 3.6F, 0.2f, limbSwing, limbSwingAmount); } } // Sitting Animation if (spitter.sitProgress > 0) { this.progressPosition(body_main, spitter.sitProgress, 0.0F, 19.5F, 1.0F, 40); this.progressPosition(leg_left_upper, spitter.sitProgress, 2.0F, -2.0F, 6F, 40); this.progressPosition(leg_right_upper, spitter.sitProgress, -2.0F, -2.0F, 6F, 40); //this.progressRotation(head_neck, spitter.sitProgress, -0.5462880558742251F, 0.0F, 0.0F, 40); this.progressRotation(leg_left_upper, spitter.sitProgress, -0.27314402793711257F, -0.0F, -0.045553093477052F, 40); this.progressRotation(leg_left_lower, spitter.sitProgress, -1.2292353921796064F, -0.22759093446006054F, 0.045553093477052F, 40); this.progressRotation(arm_left_upper, spitter.sitProgress, 0.27314402793711207F, -6.200655107570901E-17F, -0.24361070658773F, 40); this.progressRotation(arm_left_lower, spitter.sitProgress, -1.8668041679331349F, 0.0F, 0.10803588069844901F, 40); this.progressRotation(leg_right_upper, spitter.sitProgress, -0.27314402793711257F, -0.0F, 0.045553093477052F, 40); this.progressRotation(leg_right_lower, spitter.sitProgress, -1.2292353921796064F, 0.22759093446006054F, -0.045553093477052F, 40); this.progressRotation(arm_right_upper, spitter.sitProgress, 0.27314402793711207F, 6.200655107570901E-17F, 0.24361070658773F, 40); this.progressRotation(arm_right_lower, spitter.sitProgress, -1.8668041679331349F, 0.0F, -0.10803588069844901F, 40); } // Sleeping Animation if (spitter.sleepProgress > 0) { this.progressPosition(body_main, spitter.sleepProgress, -4.0F, 20F, -4.0F, 40); this.progressRotation(body_main, spitter.sleepProgress, 0, 0.0F, -1.50255395F, 40); this.progressRotation(body_abdomen, spitter.sleepProgress, -0.455356402F, -0.0F, -0, 40); this.progressRotation(leg_right_upper, spitter.sleepProgress, -0.500909495F , -0.0F, 0.045553093477052F, 40); this.progressRotation(leg_left_lower, spitter.sleepProgress, -0.13665928F, 0, 0.77405352F, 40); //this.progressRotation(head_neck, spitter.sleepProgress, 0.27314402793711207F, 0.22759093446006054F, 0.0F, 40); this.progressRotation(arm_right_upper, spitter.sleepProgress, -0.27314402793711207F, 0, 0.09110619F, 40); this.progressRotation(arm_left_lower, spitter.sleepProgress, -0.5009095F, -0.09110619F, 1.0472F, 40); } } }
24,663
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
ModelSpadefish.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/model/ModelSpadefish.java
package untamedwilds.client.model; import com.github.alexthe666.citadel.client.model.AdvancedEntityModel; import com.github.alexthe666.citadel.client.model.AdvancedModelBox; import com.github.alexthe666.citadel.client.model.basic.BasicModelPart; import com.google.common.collect.ImmutableList; import untamedwilds.entity.fish.EntitySpadefish; public class ModelSpadefish extends AdvancedEntityModel<EntitySpadefish> { public AdvancedModelBox main_body; public AdvancedModelBox fin_top; public AdvancedModelBox fin_bottom; public AdvancedModelBox body_tail; public AdvancedModelBox fin_pec_left; public AdvancedModelBox fin_pec_right; public AdvancedModelBox fin_side_left; public AdvancedModelBox fin_side_right; public AdvancedModelBox body_hump; public AdvancedModelBox fin_tail; public ModelSpadefish() { this.texWidth = 32; this.texHeight = 32; this.fin_pec_right = new AdvancedModelBox(this, 0, -2); this.fin_pec_right.setRotationPoint(-0.5F, 3.5F, -3.0F); this.fin_pec_right.addBox(0.0F, 0.0F, 0.0F, 0, 5, 2, 0.0F); this.setRotateAngle(fin_pec_right, 0.27314402793711257F, 0.0F, 0.27314402793711257F); this.body_tail = new AdvancedModelBox(this, 0, 5); this.body_tail.setRotationPoint(0.0F, 0.0F, 6.0F); this.body_tail.addBox(-1.0F, -1.5F, 0.0F, 2, 3, 2, 0.0F); this.fin_side_left = new AdvancedModelBox(this, 20, 15); this.fin_side_left.setRotationPoint(1.5F, 1.0F, -1.0F); this.fin_side_left.addBox(0.0F, -1.0F, 0.0F, 0, 2, 5, 0.0F); this.setRotateAngle(fin_side_left, 0.0F, 0.36425021489121656F, 0.0F); this.fin_bottom = new AdvancedModelBox(this, 16, 16); this.fin_bottom.setRotationPoint(0.0F, 2.0F, 3.0F); this.fin_bottom.addBox(0.0F, 0.0F, -4.0F, 0, 8, 8, 0.0F); this.setRotateAngle(fin_bottom, 0.27314402793711257F, 0.0F, 0.0F); this.body_hump = new AdvancedModelBox(this, 22, 0); this.body_hump.setRotationPoint(0.0F, -3.0F, -1.0F); this.body_hump.addBox(-1.0F, 0.0F, 0.0F, 2, 7, 3, 0.0F); this.setRotateAngle(body_hump, 1.4570008595648662F, 0.0F, 0.0F); this.fin_top = new AdvancedModelBox(this, 0, 16); this.fin_top.setRotationPoint(0.0F, -2.5F, 3.0F); this.fin_top.addBox(0.0F, -8.0F, -4.0F, 0, 8, 8, 0.0F); this.setRotateAngle(fin_top, -0.27314402793711257F, 0.0F, 0.0F); this.main_body = new AdvancedModelBox(this, 0, 0); this.main_body.setRotationPoint(0.0F, 21.0F, -2.0F); this.main_body.addBox(-1.4F, -4.0F, -4.0F, 3, 8, 10, 0.0F); this.fin_pec_left = new AdvancedModelBox(this, 0, -2); this.fin_pec_left.setRotationPoint(0.5F, 3.5F, -3.0F); this.fin_pec_left.addBox(0.0F, 0.0F, 0.0F, 0, 5, 2, 0.0F); this.setRotateAngle(fin_pec_left, 0.27314402793711257F, 0.0F, -0.27314402793711257F); this.fin_side_right = new AdvancedModelBox(this, 20, 15); this.fin_side_right.setRotationPoint(-1.5F, 1.0F, -1.0F); this.fin_side_right.addBox(0.0F, -1.0F, 0.0F, 0, 2, 5, 0.0F); this.setRotateAngle(fin_side_right, 0.0F, -0.36425021489121656F, 0.0F); this.fin_tail = new AdvancedModelBox(this, 12, 14); this.fin_tail.setRotationPoint(0.0F, 0.0F, 0.5F); this.fin_tail.addBox(0.0F, -3.0F, 0.0F, 0, 6, 4, 0.0F); this.main_body.addChild(this.fin_pec_right); this.main_body.addChild(this.body_tail); this.main_body.addChild(this.fin_side_left); this.main_body.addChild(this.fin_bottom); this.main_body.addChild(this.body_hump); this.main_body.addChild(this.fin_top); this.main_body.addChild(this.fin_pec_left); this.main_body.addChild(this.fin_side_right); this.body_tail.addChild(this.fin_tail); updateDefaultPose(); } @Override public Iterable<BasicModelPart> parts() { return ImmutableList.of(this.main_body); } @Override public Iterable<AdvancedModelBox> getAllParts() { return ImmutableList.of( main_body, fin_top, fin_bottom, body_tail, fin_pec_left, fin_pec_right, fin_side_left, fin_side_right, body_hump, fin_tail ); } public void setupAnim(EntitySpadefish spadefish, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) { resetToDefaultPose(); float globalSpeed = 0.5f; float globalDegree = 1f; if (!spadefish.isInWater()) { this.setRotateAngle(main_body, 0, 0, (float)Math.toRadians(90D)); } AdvancedModelBox[] bodyParts = new AdvancedModelBox[]{main_body, body_tail, fin_tail}; chainSwing(bodyParts, globalSpeed, globalDegree * 1.1f, -5, limbSwing, limbSwingAmount); float speed = Math.min((float)spadefish.getCurrentSpeed(), 0.08F); //this.fin_top.rotateAngleX = this.fin_top.defaultRotationX + speed * -3; //this.fin_bottom.rotateAngleX = this.fin_bottom.defaultRotationX + speed * 3; swing(fin_pec_left, globalSpeed, globalDegree * 0.8f, false, 0, 0.2f, ageInTicks / 6, 0.6F); swing(fin_pec_right, globalSpeed, globalDegree * 0.8f, true, 0, 0.2f, ageInTicks / 6, 0.6F); } }
5,410
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
ModelArowana.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/model/ModelArowana.java
package untamedwilds.client.model; import com.github.alexthe666.citadel.client.model.AdvancedEntityModel; import com.github.alexthe666.citadel.client.model.AdvancedModelBox; import com.github.alexthe666.citadel.client.model.basic.BasicModelPart; import com.google.common.collect.ImmutableList; import untamedwilds.entity.fish.EntityArowana; public class ModelArowana extends AdvancedEntityModel<EntityArowana> { public AdvancedModelBox body_main; public AdvancedModelBox body_tail_1; public AdvancedModelBox body_head; public AdvancedModelBox body_tail_fin_1; public AdvancedModelBox body_tail_fin_2; public AdvancedModelBox body_tail_3; public AdvancedModelBox body_tail_fin; public AdvancedModelBox head_mouth; public AdvancedModelBox shape15; public AdvancedModelBox shape16; public AdvancedModelBox head_mouth_whisker_1; public AdvancedModelBox head_mouth_whisker_2; public ModelArowana() { this.texWidth = 64; this.texHeight = 32; this.head_mouth = new AdvancedModelBox(this, 0, 25); this.head_mouth.setRotationPoint(0.0F, 1.5F, -6.0F); this.head_mouth.addBox(-1.5F, -4.0F, -1.0F, 3, 5, 1, 0.0F); this.head_mouth.scaleX = 1.1F; this.head_mouth_whisker_1 = new AdvancedModelBox(this, 16, 20); this.head_mouth_whisker_1.setRotationPoint(0.5F, -3.9F, 0.0F); this.head_mouth_whisker_1.addBox(-0.5F, 0.0F, -3.0F, 1, 0, 3, 0.0F); this.setRotateAngle(head_mouth_whisker_1, 0.0F, -0.22759093446006054F, 0.0F); this.body_main = new AdvancedModelBox(this, 0, 0); this.body_main.setRotationPoint(0.0F, 21.1F, -2.0F); this.body_main.addBox(-1.5F, -2.5F, -4.0F, 3, 5, 7, 0.0F); this.body_head = new AdvancedModelBox(this, 0, 14); this.body_head.setRotationPoint(0.0F, -0.2F, -2.0F); this.body_head.addBox(-1.5F, -2.5F, -6.0F, 3, 5, 5, 0.0F); this.setRotateAngle(body_head, 0.091106186954104F, 0.0F, 0.0F); this.body_head.scaleX = 1.1F; this.body_tail_fin_1 = new AdvancedModelBox(this, 24, 8); this.body_tail_fin_1.setRotationPoint(0.0F, -1.4F, 4.5F); this.body_tail_fin_1.addBox(0.0F, -5.0F, 0.0F, 0, 10, 4, 0.0F); this.setRotateAngle(body_tail_fin_1, 1.4570008595648662F, 0.0F, 0.0F); this.body_tail_fin_2 = new AdvancedModelBox(this, 32, 8); this.body_tail_fin_2.setRotationPoint(0.0F, 1.5F, 4.5F); this.body_tail_fin_2.addBox(0.0F, -5.0F, 0.0F, 0, 10, 4, 0.0F); this.setRotateAngle(body_tail_fin_2, -1.4114477660878142F, 0.0F, 0.0F); this.head_mouth_whisker_2 = new AdvancedModelBox(this, 16, 20); this.head_mouth_whisker_2.setRotationPoint(-0.5F, -3.9F, 0.0F); this.head_mouth_whisker_2.addBox(-0.5F, 0.0F, -3.0F, 1, 0, 3, 0.0F); this.setRotateAngle(head_mouth_whisker_2, 0.0F, 0.22759093446006054F, 0.0F); this.body_tail_fin = new AdvancedModelBox(this, 44, 8); this.body_tail_fin.setRotationPoint(0.0F, 0.0F, 2.3F); this.body_tail_fin.addBox(0.0F, 0.0F, 0.0F, 0, 5, 5, 0.0F); this.setRotateAngle(body_tail_fin, 0.7853981633974483F, 0.0F, 0.0F); this.shape15 = new AdvancedModelBox(this, 24, 20); this.shape15.setRotationPoint(1.3F, 1.0F, -3.0F); this.shape15.addBox(0.0F, 0.0F, -1.5F, 0, 7, 3, 0.0F); this.setRotateAngle(shape15, 1.0471975511965976F, 0.31869712141416456F, 0.0F); this.shape16 = new AdvancedModelBox(this, 24, 20); this.shape16.setRotationPoint(-1.3F, 1.0F, -3.0F); this.shape16.addBox(0.0F, 0.0F, -1.5F, 0, 7, 3, 0.0F); this.setRotateAngle(shape16, 1.0471975511965976F, -0.31869712141416456F, 0.0F); this.body_tail_1 = new AdvancedModelBox(this, 24, 0); this.body_tail_1.setRotationPoint(0.0F, 0.0F, 3.0F); this.body_tail_1.addBox(-1.5F, -2.5F, 0.0F, 3, 5, 7, 0.0F); this.body_tail_3 = new AdvancedModelBox(this, 44, 6); this.body_tail_3.setRotationPoint(0.0F, 0.0F, 5.6F); this.body_tail_3.addBox(-1.0F, -1.5F, 0.0F, 2, 3, 4, 0.0F); this.body_head.addChild(this.head_mouth); this.head_mouth.addChild(this.head_mouth_whisker_1); this.body_main.addChild(this.body_head); this.body_tail_1.addChild(this.body_tail_fin_1); this.body_tail_1.addChild(this.body_tail_fin_2); this.head_mouth.addChild(this.head_mouth_whisker_2); this.body_tail_3.addChild(this.body_tail_fin); this.body_head.addChild(this.shape15); this.body_head.addChild(this.shape16); this.body_main.addChild(this.body_tail_1); this.body_tail_1.addChild(this.body_tail_3); updateDefaultPose(); } @Override public Iterable<BasicModelPart> parts() { return ImmutableList.of(this.body_main); } @Override public Iterable<AdvancedModelBox> getAllParts() { return ImmutableList.of(body_main, body_tail_1, body_head, body_tail_fin_1, body_tail_fin_2, body_tail_3, body_tail_fin, head_mouth, shape15, shape16, head_mouth_whisker_1, head_mouth_whisker_2); } public void setupAnim(EntityArowana arowana, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) { resetToDefaultPose(); float globalSpeed = 0.5f; float globalDegree = 1f; // Breathing Animation walk(head_mouth, globalSpeed, globalDegree * 0.2f, false, 0.2F, 0.2f, ageInTicks / 6, 0.6F); swing(shape15, globalSpeed, globalDegree * 0.5f, false, 0, 0.2f, ageInTicks / 6, 0.6F); swing(shape16, globalSpeed, globalDegree * 0.5f, true, 0, 0.2f, ageInTicks / 6, 0.6F); // Pitch/Yaw handler if (!arowana.isInWater()) { this.setRotateAngle(body_main, 0, 0, (float)Math.toRadians(90D)); } else { this.setRotateAngle(body_main, netHeadYaw * 2 * ((float) Math.PI / 180F), headPitch * 2 * ((float) Math.PI / 180F), 0); } // Movement Animation AdvancedModelBox[] bodyParts = new AdvancedModelBox[]{body_head, body_main, body_tail_1, body_tail_3, body_tail_fin}; chainSwing(bodyParts, globalSpeed, globalDegree * 1.1F, -5, limbSwing, limbSwingAmount); } }
6,267
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z
ModelCamel.java
/FileExtraction/Java_unseen/RayTrace082_untamedwilds/src/main/java/untamedwilds/client/model/ModelCamel.java
package untamedwilds.client.model; import com.github.alexthe666.citadel.animation.IAnimatedEntity; import com.github.alexthe666.citadel.client.model.AdvancedEntityModel; import com.github.alexthe666.citadel.client.model.AdvancedModelBox; import com.github.alexthe666.citadel.client.model.ModelAnimator; import com.github.alexthe666.citadel.client.model.basic.BasicModelPart; import com.google.common.collect.ImmutableList; import net.minecraft.util.Mth; import untamedwilds.entity.mammal.EntityBigCat; import untamedwilds.entity.mammal.EntityCamel; import untamedwilds.entity.mammal.EntityHyena; public class ModelCamel extends AdvancedEntityModel<EntityCamel> { public AdvancedModelBox body_main; public AdvancedModelBox leg_left_thigh; public AdvancedModelBox body_hump_front; public AdvancedModelBox arm_left_1; public AdvancedModelBox neck_1; public AdvancedModelBox body_hump_back; public AdvancedModelBox body_hump_centre; public AdvancedModelBox arm_right_1; public AdvancedModelBox leg_right_thigh; public AdvancedModelBox tail; public AdvancedModelBox leg_left_calf; public AdvancedModelBox leg_left_calf_1; public AdvancedModelBox leg_left_hair; public AdvancedModelBox arm_left_2; public AdvancedModelBox arm_left_hair; public AdvancedModelBox neck_2; public AdvancedModelBox neck_hair_1; public AdvancedModelBox head_main; public AdvancedModelBox neck_hair_2; public AdvancedModelBox head_nose; public AdvancedModelBox head_nose_1; public AdvancedModelBox ear_left; public AdvancedModelBox head_hair; public AdvancedModelBox ear_right; public AdvancedModelBox arm_right_2; public AdvancedModelBox arm_right_hair; public AdvancedModelBox leg_right_calf; public AdvancedModelBox leg_right_calf_1; public AdvancedModelBox leg_right_hair; public AdvancedModelBox eye_left; public AdvancedModelBox eye_right; private final ModelAnimator animator; public ModelCamel() { this.texWidth = 128; this.texHeight = 64; this.arm_right_1 = new AdvancedModelBox(this, 0, 0); this.arm_right_1.mirror = true; this.arm_right_1.setRotationPoint(-3.5F, -0.8F, -7.8F); this.arm_right_1.addBox(-2.5F, -1.5F, -3.0F, 5, 12, 6, 0.0F); this.setRotateAngle(arm_right_1, 0.18203784098300857F, 0.0F, 0.0F); this.body_main = new AdvancedModelBox(this, 0, 0); this.body_main.setRotationPoint(0.0F, -0.7F, 0.0F); this.body_main.addBox(-5.0F, -6.0F, -10.0F, 10, 12, 24, 0.0F); this.setRotateAngle(body_main, -0.045553093477052F, 0.0F, 0.0F); this.leg_right_thigh = new AdvancedModelBox(this, 44, 0); this.leg_right_thigh.mirror = true; this.leg_right_thigh.setRotationPoint(-3.8F, -2.0F, 11.5F); this.leg_right_thigh.addBox(-2.5F, -1.5F, -4.0F, 5, 10, 8, 0.0F); this.setRotateAngle(leg_right_thigh, 0.136659280431156F, 0.0F, 0.0F); this.ear_right = new AdvancedModelBox(this, 16, 0); this.ear_right.setRotationPoint(-3.0F, -3.0F, -1.0F); this.ear_right.addBox(-3.0F, -2.0F, 0.0F, 3, 3, 1, 0.0F); this.setRotateAngle(ear_right, 0.7285004297824331F, 0.5009094953223726F, 0.7740535232594852F); this.leg_right_hair = new AdvancedModelBox(this, 89, 48); this.leg_right_hair.mirror = true; this.leg_right_hair.setRotationPoint(0.0F, 0.0F, 1.0F); this.leg_right_hair.addBox(-3.0F, 0.0F, -3.5F, 6, 9, 7, 0.0F); this.setRotateAngle(leg_right_hair, -0.136659280431156F, 0.0F, 0.0F); this.neck_hair_2 = new AdvancedModelBox(this, 88, 45); this.neck_hair_2.setRotationPoint(0.0F, -0.6F, -2.0F); this.neck_hair_2.addBox(-3.0F, -3.1F, -7.3F, 6, 8, 8, 0.0F); this.setRotateAngle(neck_hair_2, -0.22759093446006054F, 0.0F, 0.0F); this.neck_hair_2.scaleX = 1.01F; this.arm_left_hair = new AdvancedModelBox(this, 89, 48); this.arm_left_hair.setRotationPoint(0.0F, 3.0F, 0.0F); this.arm_left_hair.addBox(-3.0F, 0.0F, -3.5F, 6, 9, 7, 0.0F); this.leg_right_calf = new AdvancedModelBox(this, 68, 20); this.leg_right_calf.mirror = true; this.leg_right_calf.setRotationPoint(0.0F, 7.0F, -0.5F); this.leg_right_calf.addBox(-2.0F, 0.0F, -2.0F, 4, 10, 4, 0.0F); this.setRotateAngle(leg_right_calf, 0.31869712141416456F, 0.0F, 0.0F); this.body_hump_back = new AdvancedModelBox(this, 30, 46); this.body_hump_back.setRotationPoint(0.0F, -5.8F, 9.0F); this.body_hump_back.addBox(-3.0F, -6.0F, -6.0F, 6, 8, 10, 0.0F); this.setRotateAngle(body_hump_back, -0.045553093477052F, 0.0F, 0.0F); this.arm_right_2 = new AdvancedModelBox(this, 84, 20); this.arm_right_2.mirror = true; this.arm_right_2.setRotationPoint(0.01F, 9.05F, 0.01F); this.arm_right_2.addBox(-1.5F, 0.0F, -1.5F, 3, 17, 3, 0.0F); this.setRotateAngle(arm_right_2, -0.136659280431156F, 0.0F, 0.0F); this.arm_left_1 = new AdvancedModelBox(this, 0, 0); this.arm_left_1.setRotationPoint(3.5F, -0.8F, -7.8F); this.arm_left_1.addBox(-2.5F, -1.5F, -3.0F, 5, 12, 6, 0.0F); this.setRotateAngle(arm_left_1, 0.18203784098300857F, 0.0F, 0.0F); this.arm_right_hair = new AdvancedModelBox(this, 89, 48); this.arm_right_hair.mirror = true; this.arm_right_hair.setRotationPoint(0.0F, 3.0F, 0.0F); this.arm_right_hair.addBox(-3.0F, 0.0F, -3.5F, 6, 9, 7, 0.0F); this.body_hump_front = new AdvancedModelBox(this, 0, 48); this.body_hump_front.setRotationPoint(0.0F, -6.0F, -3.0F); this.body_hump_front.addBox(-3.0F, -6.0F, -6.0F, 6, 8, 8, 0.0F); this.setRotateAngle(body_hump_front, 0.136659280431156F, 0.0F, 0.0F); this.tail = new AdvancedModelBox(this, 62, 49); this.tail.setRotationPoint(0.0F, -5.0F, 14.0F); this.tail.addBox(-1.5F, 0.0F, -1.5F, 3, 12, 3, 0.0F); this.setRotateAngle(tail, 0.22759093446006054F, 0.0F, 0.0F); this.leg_left_thigh = new AdvancedModelBox(this, 44, 0); this.leg_left_thigh.setRotationPoint(3.8F, -2.0F, 11.5F); this.leg_left_thigh.addBox(-2.5F, -1.5F, -4.0F, 5, 10, 8, 0.0F); this.setRotateAngle(leg_left_thigh, 0.136659280431156F, 0.0F, 0.0F); this.neck_2 = new AdvancedModelBox(this, 58, 34); this.neck_2.setRotationPoint(0.0F, 0.0F, -10.2F); this.neck_2.addBox(-2.5F, -2.5F, -8.5F, 5, 5, 10, 0.0F); this.setRotateAngle(neck_2, -1.3658946726107624F, 0.0F, 0.0F); this.ear_left = new AdvancedModelBox(this, 16, 0); this.ear_left.setRotationPoint(3.0F, -3.0F, -1.0F); this.ear_left.addBox(0.0F, -2.0F, 0.0F, 3, 3, 1, 0.0F); this.setRotateAngle(ear_left, 0.7285004297824331F, -0.5009094953223726F, -0.7740535232594852F); this.head_nose = new AdvancedModelBox(this, 94, 0); this.head_nose.setRotationPoint(0.0F, -4.5F, -6.0F); this.head_nose.addBox(-3.0F, 0.0F, -6.0F, 6, 3, 6, 0.0F); this.setRotateAngle(head_nose, 0.18203784098300857F, 0.0F, 0.0F); this.leg_left_hair = new AdvancedModelBox(this, 89, 48); this.leg_left_hair.setRotationPoint(0.0F, 0.0F, 1.0F); this.leg_left_hair.addBox(-3.0F, 0.0F, -3.5F, 6, 9, 7, 0.0F); this.setRotateAngle(leg_left_hair, -0.136659280431156F, 0.0F, 0.0F); this.leg_left_calf_1 = new AdvancedModelBox(this, 84, 26); this.leg_left_calf_1.setRotationPoint(0.0F, 9.0F, 0.0F); this.leg_left_calf_1.addBox(-1.5F, 0.0F, -1.5F, 3, 11, 3, 0.0F); this.setRotateAngle(leg_left_calf_1, -0.40980330836826856F, 0.0F, 0.0F); this.head_nose_1 = new AdvancedModelBox(this, 62, 0); this.head_nose_1.setRotationPoint(0.0F, -1.8F, -6.0F); this.head_nose_1.addBox(-2.5F, 0.0F, -5.0F, 5, 2, 5, 0.0F); this.leg_right_calf_1 = new AdvancedModelBox(this, 84, 26); this.leg_right_calf_1.mirror = true; this.leg_right_calf_1.setRotationPoint(0.0F, 9.0F, 0.0F); this.leg_right_calf_1.addBox(-1.5F, 0.0F, -1.5F, 3, 11, 3, 0.0F); this.setRotateAngle(leg_right_calf_1, -0.40980330836826856F, 0.0F, 0.0F); this.neck_hair_1 = new AdvancedModelBox(this, 89, 44); this.neck_hair_1.setRotationPoint(0.0F, 0.0F, -2.0F); this.neck_hair_1.addBox(-3.0F, -4.0F, -12.0F, 6, 8, 12, 0.0F); this.head_main = new AdvancedModelBox(this, 0, 36); this.head_main.setRotationPoint(0.0F, -2.4F, -6.3F); this.head_main.addBox(-3.0F, -5.0F, -6.0F, 6, 5, 6, 0.0F); this.setRotateAngle(head_main, 1.2747884856566583F, 0.0F, 0.0F); this.leg_left_calf = new AdvancedModelBox(this, 68, 20); this.leg_left_calf.setRotationPoint(0.0F, 7.0F, -0.5F); this.leg_left_calf.addBox(-2.0F, 0.0F, -2.0F, 4, 10, 4, 0.0F); this.setRotateAngle(leg_left_calf, 0.31869712141416456F, 0.0F, 0.0F); this.arm_left_2 = new AdvancedModelBox(this, 84, 20); this.arm_left_2.setRotationPoint(0.01F, 9.05F, 0.01F); this.arm_left_2.addBox(-1.5F, 0.0F, -1.5F, 3, 17, 3, 0.0F); this.setRotateAngle(arm_left_2, -0.136659280431156F, 0.0F, 0.0F); this.body_hump_centre = new AdvancedModelBox(this, 70, 0); this.body_hump_centre.setRotationPoint(0.0F, -6.8F, 3.0F); this.body_hump_centre.addBox(-3.0F, -6.0F, -6.0F, 6, 8, 12, 0.0F); this.setRotateAngle(body_hump_centre, -0.045553093477052F, 0.0F, 0.0F); this.head_hair = new AdvancedModelBox(this, 96, 29); this.head_hair.setRotationPoint(0.0F, -3.0F, 0.8F); this.head_hair.addBox(-3.0F, -3.1F, -7.3F, 6, 8, 8, 0.0F); this.setRotateAngle(head_hair, -0.22759093446006054F, 0.0F, 0.0F); this.head_hair.scaleX = 1.02F; this.neck_1 = new AdvancedModelBox(this, 96, 10); this.neck_1.setRotationPoint(0.0F, 0.0F, -6.0F); this.neck_1.addBox(-2.5F, -2.5F, -12.0F, 5, 5, 10, 0.0F); this.setRotateAngle(neck_1, 0.136659280431156F, 0.0F, 0.0F); this.neck_1.scaleX = 1.01F; this.eye_right = new AdvancedModelBox(this, 0, 0); this.eye_right.mirror = true; this.eye_right.setRotationPoint(-3.01F, -3.0F, -4.0F); this.eye_right.addBox(0.0F, -1F, -1.0F, 0, 1, 2, 0.0F); this.eye_left = new AdvancedModelBox(this, 0, 0); this.eye_left.setRotationPoint(3.01F, -3.0F, -4.0F); this.eye_left.addBox(0.0F, -1F, -1.0F, 0, 1, 2, 0.0F); this.body_main.addChild(this.arm_right_1); this.body_main.addChild(this.leg_right_thigh); this.head_main.addChild(this.ear_right); this.leg_right_calf.addChild(this.leg_right_hair); this.neck_2.addChild(this.neck_hair_2); this.arm_left_1.addChild(this.arm_left_hair); this.leg_right_thigh.addChild(this.leg_right_calf); this.body_main.addChild(this.body_hump_back); this.arm_right_1.addChild(this.arm_right_2); this.body_main.addChild(this.arm_left_1); this.arm_right_1.addChild(this.arm_right_hair); this.body_main.addChild(this.body_hump_front); this.body_main.addChild(this.tail); this.body_main.addChild(this.leg_left_thigh); this.neck_1.addChild(this.neck_2); this.head_main.addChild(this.ear_left); this.head_main.addChild(this.head_nose); this.leg_left_calf.addChild(this.leg_left_hair); this.leg_left_calf.addChild(this.leg_left_calf_1); this.head_main.addChild(this.head_nose_1); this.leg_right_calf.addChild(this.leg_right_calf_1); this.neck_1.addChild(this.neck_hair_1); this.neck_2.addChild(this.head_main); this.leg_left_thigh.addChild(this.leg_left_calf); this.arm_left_1.addChild(this.arm_left_2); this.body_main.addChild(this.body_hump_centre); this.head_main.addChild(this.head_hair); this.body_main.addChild(this.neck_1); this.head_main.addChild(this.eye_left); this.head_main.addChild(this.eye_right); animator = ModelAnimator.create(); updateDefaultPose(); } @Override public Iterable<BasicModelPart> parts() { return ImmutableList.of(this.body_main); } @Override public Iterable<AdvancedModelBox> getAllParts() { return ImmutableList.of( body_main, leg_left_thigh, body_hump_front, arm_left_1, neck_1, body_hump_back, body_hump_centre, arm_right_1, leg_right_thigh, tail, leg_left_calf, leg_left_calf_1, leg_left_hair, arm_left_2, arm_left_hair, neck_2, neck_hair_1, head_main, neck_hair_2, head_nose, head_nose_1, ear_left, head_hair, ear_right, arm_right_2, arm_right_hair, leg_right_calf, leg_right_calf_1, leg_right_hair, eye_left, eye_right ); } private void animate(IAnimatedEntity entityIn) { animator.update(entityIn); animator.setAnimation(EntityCamel.IDLE_TALK); animator.startKeyframe(10); this.rotate(animator, neck_1, -5.22F, 0, 0); this.rotate(animator, neck_2, -20F, 0, 0); this.rotate(animator, head_nose_1, 26.09F, 0, 0); this.rotate(animator, head_main, -26.09F, 0, 0); animator.endKeyframe(); animator.resetKeyframe(10); animator.setAnimation(EntityCamel.ATTACK_SPIT); animator.startKeyframe(6); this.rotate(animator, neck_1, 5.22F, 0, 0); this.rotate(animator, neck_2, -46.96F, 0, 0); animator.move(head_main, 0, 2, 0); this.rotate(animator, head_main, 15.65F, 0, 0); animator.endKeyframe(); animator.startKeyframe(4); this.rotate(animator, neck_2, 46.96F, 0, 0); animator.move(head_main, 0, 2, 0); this.rotate(animator, head_main, -28.70F, 0, 0); animator.move(head_nose, 0, 0, 1.5F); this.rotate(animator, head_nose, -28.70F, 0, 0); this.rotate(animator, head_nose, 36.52F, 0, 0); animator.endKeyframe(); animator.resetKeyframe(6); } public void setupAnim(EntityCamel camel, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) { this.resetToDefaultPose(); animate(camel); float globalSpeed = 1f; float globalDegree = 1f; limbSwingAmount = Math.min(limbSwingAmount, 0.4F); if (camel.isNoAi()) { limbSwing = camel.tickCount / 4F; limbSwingAmount = 0.4F; } // Breathing Animation this.body_main.setScale((float) (1.0F + Math.sin(ageInTicks / 20) * 0.06F), (float) (1.0F + Math.sin(ageInTicks / 16) * 0.06F), 1.0F); bob(body_main, 0.4F * globalSpeed, 0.1F, false, ageInTicks / 20, 2); bob(arm_right_1, 0.4F * globalSpeed, 0.1F, false, -ageInTicks / 20, 2); bob(arm_left_1, 0.4F * globalSpeed, 0.1F, false, -ageInTicks / 20, 2); bob(leg_right_calf, 0.4F * globalSpeed, 0.1F, false, -ageInTicks / 20, 2); bob(leg_left_calf, 0.4F * globalSpeed, 0.1F, false, -ageInTicks / 20, 2); walk(neck_1, 0.4f * globalSpeed, 0.03f, false, 2.4F, 0.08F, ageInTicks / 20, 2); if (camel.sleepProgress == 0) walk(neck_2, 0.4f * globalSpeed, 0.03f, false, 2.8F, 0.06F, ageInTicks / 20, 2); // Blinking Animation if (!camel.shouldRenderEyes()) { this.eye_right.setRotationPoint(-0.51F, -0.5F, -3.0F); this.eye_left.setRotationPoint(0.51F, -0.5F, -3.0F); } // Head Tracking Animation if (!camel.isSleeping()) { this.faceTarget(netHeadYaw, headPitch, 4, neck_1); this.faceTarget(netHeadYaw, headPitch, 4, neck_2); this.faceTarget(netHeadYaw, headPitch, 3, head_main); } // Pitch/Yaw handler if (camel.isInWater() && !camel.isOnGround()) { float pitch = Mth.clamp(camel.getXRot(), -20F, 20.0F) - 10; this.setRotateAngle(body_main, (float) (pitch * Math.PI / 180F), 0, 0); } // Movement Animation if (camel.canMove()) { if (camel.getCurrentSpeed() > 0.1f || camel.isAngry()) { // Running animation bob(body_main, 0.5F * globalSpeed, 0.5F, false, limbSwing, limbSwingAmount); walk(body_main, 0.5f * globalSpeed, 0.5f * globalDegree, true, 0.5F, 0f, limbSwing, limbSwingAmount); walk(neck_1, 0.5f * globalSpeed, -0.5f * globalDegree, true, 0.5F, 0f, limbSwing, limbSwingAmount); walk(neck_2, 0.5f * globalSpeed, 0.3f * globalDegree, false, 0.5F, 0f, limbSwing, limbSwingAmount); bob(arm_right_1, 0.5F * globalSpeed, 0.8F, false, limbSwing, limbSwingAmount); walk(arm_right_1, 0.5f * globalSpeed, 1f * globalDegree, true, 0F, 0f, limbSwing, limbSwingAmount); walk(arm_right_2, 0.5f * globalSpeed, 0.6f * globalDegree, true, 0.2F, 0.2f, limbSwing, limbSwingAmount); bob(arm_left_1, 0.5F * globalSpeed, 0.8F, false, limbSwing, limbSwingAmount); walk(arm_left_1, 0.5f * globalSpeed, 1f * globalDegree, true, 0.6F, 0f, limbSwing, limbSwingAmount); walk(arm_left_2, 0.5f * globalSpeed, 0.6f * globalDegree, true, 0.8F, 0.2f, limbSwing, limbSwingAmount); bob(leg_right_calf, 0.5F * globalSpeed, 0.8F, false, limbSwing, limbSwingAmount); walk(leg_right_calf, 0.5f * globalSpeed, 1f * globalDegree, true, 1.4F, 0f, limbSwing, limbSwingAmount); walk(leg_right_calf_1, 0.5f * globalSpeed, 0.6f * globalDegree, true, 1.6F, 0.2f, limbSwing, limbSwingAmount); bob(leg_left_calf, 0.5F * globalSpeed, 0.8F, false, limbSwing, limbSwingAmount); walk(leg_left_calf, 0.5f * globalSpeed, 1f * globalDegree, true, 2F, 0f, limbSwing, limbSwingAmount); walk(leg_left_calf_1, 0.5f * globalSpeed, 0.6f * globalDegree, true, 2.2F, 0.2f, limbSwing, limbSwingAmount); } else { // Walking Animation flap(body_main, 0.5F * globalSpeed, 0.2F,false, 0, 0, limbSwing, limbSwingAmount); flap(neck_1, 0.5F * globalSpeed, 0.2F,true, 0.2F, 0, limbSwing, limbSwingAmount); bob(arm_right_1, 0.5F * globalSpeed, 0.8F, false, limbSwing, limbSwingAmount); walk(arm_right_1, 0.5f * globalSpeed, globalDegree, true, 0F, 0f, limbSwing, limbSwingAmount); walk(arm_right_2, 0.5f * globalSpeed, 0.6f * globalDegree, true, 0.2F, 0.2f, limbSwing, limbSwingAmount); bob(arm_left_1, 0.5F * globalSpeed, 0.8F, false, limbSwing, limbSwingAmount); walk(arm_left_1, 0.5f * globalSpeed, globalDegree, true, 2.4F, 0f, limbSwing, limbSwingAmount); walk(arm_left_2, 0.5f * globalSpeed, 0.6f * globalDegree, true, 2.6F, 0.2f, limbSwing, limbSwingAmount); bob(leg_right_thigh, 0.5F * globalSpeed, 0.8F, false, limbSwing, limbSwingAmount); walk(leg_right_thigh, 0.5f * globalSpeed, globalDegree, true, 0.2F, 0f, limbSwing, limbSwingAmount); walk(leg_right_calf_1, 0.5f * globalSpeed, 0.6f * globalDegree, true, 0.4F, 0.2f, limbSwing, limbSwingAmount); bob(leg_left_thigh, 0.5F * globalSpeed, 0.8F, false, limbSwing, limbSwingAmount); walk(leg_left_thigh, 0.5f * globalSpeed, globalDegree, true, 2.6F, 0f, limbSwing, limbSwingAmount); walk(leg_left_calf_1, 0.5f * globalSpeed, 0.6f * globalDegree, true, 2.8F, 0.2f, limbSwing, limbSwingAmount); } } // Sitting Animation if (camel.sitProgress > 0) { this.progressPosition(body_main, camel.sitProgress, 0F, 15.30F, 0F, 40); this.progressRotation(neck_1, camel.sitProgress, 0F, 0, 0F, 40); this.progressRotation(arm_left_1, camel.sitProgress, (float)Math.toRadians(-26.09), 0.0F, (float)Math.toRadians(-10.43), 40); this.progressRotation(arm_left_2, camel.sitProgress, (float)Math.toRadians(112.17), (float)Math.toRadians(-2.61), (float)Math.toRadians(10.43), 40); this.progressRotation(arm_right_1, camel.sitProgress, (float)Math.toRadians(-26.09), 0.0F, (float)Math.toRadians(10.43), 40); this.progressRotation(arm_right_2, camel.sitProgress, (float)Math.toRadians(112.17), (float)Math.toRadians(2.61), (float)Math.toRadians(-10.43), 40); this.progressPosition(leg_left_thigh, camel.sitProgress, 3.80F, -3F, 11.50F, 40); this.progressRotation(leg_left_thigh, camel.sitProgress, (float)Math.toRadians(-7.83), (float)Math.toRadians(-5.22), (float)Math.toRadians(-7.83), 40); this.progressRotation(leg_left_calf, camel.sitProgress, (float)Math.toRadians(-54.78F), 0, 0F, 40); this.progressRotation(leg_left_calf_1, camel.sitProgress, (float)Math.toRadians(161.74), 0, 0F, 40); this.progressPosition(leg_right_thigh, camel.sitProgress, -3.80F, -3F, 11.50F, 40); this.progressRotation(leg_right_thigh, camel.sitProgress, (float)Math.toRadians(-7.83), (float)Math.toRadians(5.22), (float)Math.toRadians(7.83), 40); this.progressRotation(leg_right_calf, camel.sitProgress, (float)Math.toRadians(-54.78F), 0, 0F, 40); this.progressRotation(leg_right_calf_1, camel.sitProgress, (float)Math.toRadians(161.74), 0, 0F, 40); } // Sleeping Animation if (camel.sleepProgress > 0) { this.progressPosition(body_main, camel.sleepProgress, 0F, 15.30F, 0F, 40); this.progressRotation(neck_1, camel.sleepProgress, (float)Math.toRadians(16), 0, 0F, 40); this.progressRotation(neck_2, camel.sleepProgress, (float)Math.toRadians(-2.61), 0, 0F, 40); this.progressPosition(head_main, camel.sleepProgress, 0F, 2.6F, -8.3F, 40); this.progressRotation(head_main, camel.sleepProgress, (float)Math.toRadians(-13.04), 0, 0F, 40); this.progressRotation(arm_left_1, camel.sleepProgress, (float)Math.toRadians(-26.09), 0.0F, (float)Math.toRadians(-10.43), 40); this.progressRotation(arm_left_2, camel.sleepProgress, (float)Math.toRadians(112.17), (float)Math.toRadians(-2.61), (float)Math.toRadians(10.43), 40); this.progressRotation(arm_right_1, camel.sleepProgress, (float)Math.toRadians(-26.09), 0.0F, (float)Math.toRadians(10.43), 40); this.progressRotation(arm_right_2, camel.sleepProgress, (float)Math.toRadians(112.17), (float)Math.toRadians(2.61), (float)Math.toRadians(-10.43), 40); this.progressPosition(leg_left_thigh, camel.sleepProgress, 3.80F, -3F, 11.50F, 40); this.progressRotation(leg_left_thigh, camel.sleepProgress, (float)Math.toRadians(-7.83), (float)Math.toRadians(-5.22), (float)Math.toRadians(-7.83), 40); this.progressRotation(leg_left_calf, camel.sleepProgress, (float)Math.toRadians(-54.78F), 0, 0F, 40); this.progressRotation(leg_left_calf_1, camel.sleepProgress, (float)Math.toRadians(161.74), 0, 0F, 40); this.progressPosition(leg_right_thigh, camel.sleepProgress, -3.80F, -3F, 11.50F, 40); this.progressRotation(leg_right_thigh, camel.sleepProgress, (float)Math.toRadians(-7.83), (float)Math.toRadians(5.22), (float)Math.toRadians(7.83), 40); this.progressRotation(leg_right_calf, camel.sleepProgress, (float)Math.toRadians(-54.78F), 0, 0F, 40); this.progressRotation(leg_right_calf_1, camel.sleepProgress, (float)Math.toRadians(161.74), 0, 0F, 40); } else { flap(tail, 0.4f * globalSpeed, 0.2f * globalDegree, true, 0F, 0f, ageInTicks / 6, 2); } } }
24,028
Java
.java
RayTrace082/untamedwilds
13
11
79
2020-07-25T21:16:24Z
2024-05-06T16:27:45Z