diff --git a/src/main/java/supersymmetry/Supersymmetry.java b/src/main/java/supersymmetry/Supersymmetry.java index cec990e9e..67b411a02 100644 --- a/src/main/java/supersymmetry/Supersymmetry.java +++ b/src/main/java/supersymmetry/Supersymmetry.java @@ -1,13 +1,17 @@ package supersymmetry; import gregtech.GTInternalTags; +import net.minecraftforge.client.model.obj.OBJLoader; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLConstructionEvent; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.event.FMLServerStartingEvent; +import net.minecraftforge.fml.relauncher.FMLLaunchHandler; +import net.minecraftforge.fml.relauncher.Side; import org.jetbrains.annotations.NotNull; +import supersymmetry.api.capability.SuSyCapabilities; import supersymmetry.api.sound.SusySounds; import supersymmetry.common.CommonProxy; import supersymmetry.common.SusyMetaEntities; @@ -54,7 +58,13 @@ public void onPreInit(@NotNull FMLPreInitializationEvent event) { SusySounds.registerSounds(); SuSyMetaTileEntities.init(); + SuSyCapabilities.init(); + SusyMetaEntities.init(); + + if (FMLLaunchHandler.side() == Side.CLIENT) { + OBJLoader.INSTANCE.addDomain(MODID); + } } @Mod.EventHandler diff --git a/src/main/java/supersymmetry/api/capability/IElytraFlyingProvider.java b/src/main/java/supersymmetry/api/capability/IElytraFlyingProvider.java new file mode 100644 index 000000000..91d0534ba --- /dev/null +++ b/src/main/java/supersymmetry/api/capability/IElytraFlyingProvider.java @@ -0,0 +1,14 @@ +package supersymmetry.api.capability; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; +import org.jetbrains.annotations.NotNull; + +/** + * Logic from EnderIO: + * ... + */ +public interface IElytraFlyingProvider { + + boolean isElytraFlying(@NotNull EntityLivingBase entity, @NotNull ItemStack itemstack, boolean shouldStop); +} diff --git a/src/main/java/supersymmetry/api/capability/SuSyCapabilities.java b/src/main/java/supersymmetry/api/capability/SuSyCapabilities.java new file mode 100644 index 000000000..30ac79026 --- /dev/null +++ b/src/main/java/supersymmetry/api/capability/SuSyCapabilities.java @@ -0,0 +1,18 @@ +package supersymmetry.api.capability; + +import gregtech.api.capability.SimpleCapabilityManager; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.common.capabilities.CapabilityInject; +import net.minecraftforge.fml.common.Mod; +import supersymmetry.Supersymmetry; + +@Mod.EventBusSubscriber(modid = Supersymmetry.MODID) +public class SuSyCapabilities { + + @CapabilityInject(IElytraFlyingProvider.class) + public static Capability ELYTRA_FLYING_PROVIDER; + + public static void init() { + SimpleCapabilityManager.registerCapabilityWithNoDefault(IElytraFlyingProvider.class); + } +} diff --git a/src/main/java/supersymmetry/api/integration/theoneprobe/TheOneProbeCompatibility.java b/src/main/java/supersymmetry/api/integration/theoneprobe/TheOneProbeCompatibility.java deleted file mode 100644 index 73f48d0f9..000000000 --- a/src/main/java/supersymmetry/api/integration/theoneprobe/TheOneProbeCompatibility.java +++ /dev/null @@ -1,13 +0,0 @@ -package supersymmetry.api.integration.theoneprobe; - -import mcjty.theoneprobe.TheOneProbe; -import mcjty.theoneprobe.api.ITheOneProbe; -import supersymmetry.api.integration.EvaporationPoolInfoProvider; - -public class TheOneProbeCompatibility { - - public static void registerCompatibility() { - ITheOneProbe oneProbe = TheOneProbe.theOneProbeImp; - oneProbe.registerProvider(new EvaporationPoolInfoProvider()); - } -} diff --git a/src/main/java/supersymmetry/api/metatileentity/logistics/IDelegator.java b/src/main/java/supersymmetry/api/metatileentity/logistics/IDelegator.java new file mode 100644 index 000000000..65b57f757 --- /dev/null +++ b/src/main/java/supersymmetry/api/metatileentity/logistics/IDelegator.java @@ -0,0 +1,14 @@ +package supersymmetry.api.metatileentity.logistics; + +import net.minecraft.util.EnumFacing; +import org.jetbrains.annotations.Nullable; + +// Mostly a marker interface +public interface IDelegator { + + /** + * @return the facing that the input facing in delegating + */ + @Nullable + EnumFacing getDelegatingFacing(EnumFacing facing); +} diff --git a/src/main/java/supersymmetry/api/metatileentity/logistics/MetaTileEntityDelegator.java b/src/main/java/supersymmetry/api/metatileentity/logistics/MetaTileEntityDelegator.java new file mode 100644 index 000000000..7197ed31d --- /dev/null +++ b/src/main/java/supersymmetry/api/metatileentity/logistics/MetaTileEntityDelegator.java @@ -0,0 +1,169 @@ +package supersymmetry.api.metatileentity.logistics; + +import codechicken.lib.render.CCRenderState; +import codechicken.lib.render.pipeline.ColourMultiplier; +import codechicken.lib.render.pipeline.IVertexOperation; +import codechicken.lib.vec.Cuboid6; +import codechicken.lib.vec.Matrix4; +import gregtech.api.capability.GregtechCapabilities; +import gregtech.api.capability.IEnergyContainer; +import gregtech.api.gui.ModularUI; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.MetaTileEntityHolder; +import gregtech.api.util.GTUtility; +import gregtech.client.renderer.texture.Textures; +import it.unimi.dsi.fastutil.objects.Object2ObjectArrayMap; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockRenderLayer; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTank; +import net.minecraftforge.fluids.capability.CapabilityFluidHandler; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; +import net.minecraftforge.items.CapabilityItemHandler; +import net.minecraftforge.items.ItemStackHandler; +import org.apache.commons.lang3.ArrayUtils; +import org.apache.commons.lang3.tuple.Pair; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.List; +import java.util.function.Predicate; + + +public abstract class MetaTileEntityDelegator extends MetaTileEntity implements IDelegator { + + protected final Predicate> capFilter; + protected final int baseColor; + + public MetaTileEntityDelegator(ResourceLocation metaTileEntityId, Predicate> capFilter, int baseColor) { + super(metaTileEntityId); + this.capFilter = capFilter; + this.baseColor = baseColor; + } + + @Override + public T getCapability(Capability capability, EnumFacing side) { + T delegatedCapability = getDelegatedCapability(capability, side); + return delegatedCapability == null ? getDefaultCapability(capability, side) : delegatedCapability; + } + + protected T getDefaultCapability(Capability capability, EnumFacing side) { + return side != null && capFilter.test(capability) && DefaultCapabilities.hasCapability(capability) ? DefaultCapabilities.getCapability(capability) : super.getCapability(capability, side); + } + + protected T getDelegatedCapability(Capability capability, EnumFacing side) { + if (capability == null || !capFilter.test(capability) || side == null) return null; + EnumFacing delegatingFacing = getDelegatingFacing(side); + if (delegatingFacing == null) return null; + TileEntity te = getWorld().getTileEntity(getPos().offset(delegatingFacing)); + if (te == null || (te instanceof MetaTileEntityHolder holder && holder.getMetaTileEntity() instanceof IDelegator)) + return null; + // TODO: make IDelegator a capability when Jet Wingsuit PR gets merged + return te.getCapability(capability, delegatingFacing.getOpposite()); + } + + @Override + public void renderMetaTileEntity(CCRenderState renderState, Matrix4 translation, IVertexOperation[] pipeline) { + IVertexOperation[] colouredPipeline = ArrayUtils.add(pipeline, + new ColourMultiplier(GTUtility.convertRGBtoOpaqueRGBA_CL(this.getPaintingColorForRendering()))); + for (EnumFacing facing : EnumFacing.values()) { + Textures.renderFace(renderState, translation, colouredPipeline, facing, Cuboid6.full, this.getBaseTexture(), BlockRenderLayer.CUTOUT_MIPPED); + } + } + + @SideOnly(Side.CLIENT) + protected TextureAtlasSprite getBaseTexture() { + return Textures.PIPE_SIDE; + } + + @Override + @SideOnly(Side.CLIENT) + public void addInformation(ItemStack stack, @Nullable World world, @NotNull List tooltip, boolean advanced) { + super.addInformation(stack, world, tooltip, advanced); + tooltip.add(I18n.format("gregtech.machine.delegator.tooltip.non_recursion")); + } + + @SideOnly(Side.CLIENT) + public Pair getParticleTexture() { + return Pair.of(getBaseTexture(), getPaintingColorForRendering()); + } + + @Override + public int getDefaultPaintingColor() { + return this.baseColor; + } + + @Override + protected boolean openGUIOnRightClick() { + return false; + } + + @Override + protected ModularUI createUI(EntityPlayer entityPlayer) { + return null; + } + + public static class DefaultCapabilities { + + private static final Object2ObjectArrayMap, ?> DEFAULT_CAPABILITIES = new Object2ObjectArrayMap<>(); + + static { + // Item + addCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, CapabilityItemHandler.ITEM_HANDLER_CAPABILITY.cast(new ItemStackHandler(1) { + + @NotNull + @Override + public ItemStack insertItem(int slot, @NotNull ItemStack stack, boolean simulate) { + return stack; + } + + @NotNull + @Override + public ItemStack extractItem(int slot, int amount, boolean simulate) { + return ItemStack.EMPTY; + } + })); + + // Fluid + addCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY.cast(new FluidTank(10000) { + + @Override + public int fill(FluidStack resource, boolean doFill) { + return 0; + } + + @Override + @Nullable + public FluidStack drainInternal(int maxDrain, boolean doDrain) { + return null; + } + })); + + // GTEU + addCapability(GregtechCapabilities.CAPABILITY_ENERGY_CONTAINER, GregtechCapabilities.CAPABILITY_ENERGY_CONTAINER.cast(IEnergyContainer.DEFAULT)); + } + + public static boolean hasCapability(@NotNull Capability capability) { + return DEFAULT_CAPABILITIES.containsKey(capability); + } + + @Nullable + @SuppressWarnings("unchecked") + public static T getCapability(@NotNull Capability capability) { + return (T) DEFAULT_CAPABILITIES.getOrDefault(capability, null); + } + + public static void addCapability(@NotNull Capability capability, @NotNull T value) { + DEFAULT_CAPABILITIES.put(capability, capability.cast(value)); + } + } +} diff --git a/src/main/java/supersymmetry/api/recipes/SuSyRecipeMaps.java b/src/main/java/supersymmetry/api/recipes/SuSyRecipeMaps.java index 1d7dd2f91..1a71a9d45 100644 --- a/src/main/java/supersymmetry/api/recipes/SuSyRecipeMaps.java +++ b/src/main/java/supersymmetry/api/recipes/SuSyRecipeMaps.java @@ -39,7 +39,7 @@ public class SuSyRecipeMaps { public static final RecipeMap ROASTER_RECIPES = new RecipeMap<>("roaster", 3, 2, 2, 3, new CatalystRecipeBuilder(), false) .setSound(GTSoundEvents.COMBUSTION); - public static final RecipeMap VACUUM_CHAMBER = new RecipeMap<>("vacuum_chamber", 4, 1, 2, 2, new SimpleRecipeBuilder(), false) + public static final RecipeMap VACUUM_CHAMBER = new RecipeMap<>("vacuum_chamber", 4, 2, 2, 2, new SimpleRecipeBuilder(), false) .setProgressBar(GuiTextures.PROGRESS_BAR_COMPRESS, ProgressWidget.MoveType.HORIZONTAL) .setSound(GTSoundEvents.CENTRIFUGE); @@ -331,6 +331,13 @@ public class SuSyRecipeMaps { .setSlotOverlay(true, false, GuiTextures.FURNACE_OVERLAY_2) .setSound(GTSoundEvents.FURNACE); + + public static final RecipeMap JET_WINGPACK_FUELS = new RecipeMap<>("jet_wingpack_fuels", 0, 0, 1, 0, new NoEnergyRecipeBuilder(), false) + .setSlotOverlay(false, false, GuiTextures.DARK_CANISTER_OVERLAY) + .setProgressBar(GuiTextures.PROGRESS_BAR_GAS_COLLECTOR, ProgressWidget.MoveType.HORIZONTAL) + .setSound(GTSoundEvents.TURBINE) + .allowEmptyOutput(); + public static void init(){ RecipeMaps.SIFTER_RECIPES.setMaxFluidInputs(1); RecipeMaps.SIFTER_RECIPES.setMaxFluidOutputs(1); diff --git a/src/main/java/supersymmetry/api/sound/SusySounds.java b/src/main/java/supersymmetry/api/sound/SusySounds.java index f63e9f5be..f8fc14b25 100644 --- a/src/main/java/supersymmetry/api/sound/SusySounds.java +++ b/src/main/java/supersymmetry/api/sound/SusySounds.java @@ -9,10 +9,12 @@ public class SusySounds { public static SoundEvent ROCKET_LOOP; public static SoundEvent DRONE_TAKEOFF; + public static SoundEvent JET_ENGINE_LOOP; public static void registerSounds() { ROCKET_LOOP = registerSound("entity.rocket_loop"); DRONE_TAKEOFF = registerSound("entity.drone_takeoff"); + JET_ENGINE_LOOP = registerSound("item.jet_wingpack_engine_active"); } private static SoundEvent registerSound(String soundNameIn) { diff --git a/src/main/java/supersymmetry/api/util/ElytraFlyingUtils.java b/src/main/java/supersymmetry/api/util/ElytraFlyingUtils.java new file mode 100644 index 000000000..a993be00a --- /dev/null +++ b/src/main/java/supersymmetry/api/util/ElytraFlyingUtils.java @@ -0,0 +1,69 @@ +package supersymmetry.api.util; + +import net.minecraft.block.material.Material; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.EntityEquipmentSlot; +import net.minecraft.item.ItemStack; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.MathHelper; +import net.minecraft.world.World; +import org.jetbrains.annotations.NotNull; +import supersymmetry.api.capability.SuSyCapabilities; + +public class ElytraFlyingUtils { + + @SuppressWarnings("DataFlowIssue") + public static boolean isElytraFlying(@NotNull EntityLivingBase entity) { + ItemStack itemstack = entity.getItemStackFromSlot(EntityEquipmentSlot.CHEST); + if (itemstack.hasCapability(SuSyCapabilities.ELYTRA_FLYING_PROVIDER, null)) { + return itemstack.getCapability(SuSyCapabilities.ELYTRA_FLYING_PROVIDER, null).isElytraFlying( + entity, itemstack, + entity.onGround || + entity instanceof EntityPlayer && ((EntityPlayer) entity).capabilities.isFlying || + entity.isRiding() || entity.isInWater() || isInLavaSafe(entity)); + } + return false; + } + + public static boolean canTakeOff(EntityPlayer player, boolean ignoreOnGround) { + return (ignoreOnGround || (!player.onGround && player.motionY < 0.0D)) && !player.isElytraFlying() && !player.isInWater() && !isInLavaSafe(player); + } + + // non-chunkloading copy of Entity.isInLava() + private static boolean isInLavaSafe(@NotNull Entity entity) { + return isMaterialInBBSafe(entity.world, + entity.getEntityBoundingBox().expand(-0.1, -0.4, -0.1), + Material.LAVA); + } + + // non-chunkloading copy of World.isMaterialInBB() + private static boolean isMaterialInBBSafe(@NotNull World world, @NotNull AxisAlignedBB bb, + @NotNull Material materialIn) { + int i = MathHelper.floor(bb.minX); + int j = MathHelper.ceil(bb.maxX); + int k = MathHelper.floor(bb.minY); + int l = MathHelper.ceil(bb.maxY); + int i1 = MathHelper.floor(bb.minZ); + int j1 = MathHelper.ceil(bb.maxZ); + BlockPos.PooledMutableBlockPos pos = BlockPos.PooledMutableBlockPos.retain(); + + for (int k1 = i; k1 < j; ++k1) { + for (int l1 = k; l1 < l; ++l1) { + for (int i2 = i1; i2 < j1; ++i2) { + pos.setPos(k1, l1, i2); + if (world.isBlockLoaded(pos, false) && + world.getBlockState(pos).getMaterial() == materialIn) { + pos.release(); + return true; + } + } + } + } + + pos.release(); + return false; + } +} diff --git a/src/main/java/supersymmetry/asm/SusyLoadingPlugin.java b/src/main/java/supersymmetry/asm/SusyLoadingPlugin.java index 6d8d9849a..be641f144 100644 --- a/src/main/java/supersymmetry/asm/SusyLoadingPlugin.java +++ b/src/main/java/supersymmetry/asm/SusyLoadingPlugin.java @@ -7,7 +7,10 @@ import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin.SortingIndex; import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin.TransformerExclusions; import org.jetbrains.annotations.Nullable; +import zone.rong.mixinbooter.IEarlyMixinLoader; +import java.util.Arrays; +import java.util.List; import java.util.Map; // I am sorry for this - htmlcsjs @@ -15,7 +18,7 @@ @MCVersion(ForgeVersion.mcVersion) @TransformerExclusions({"gregtech.asm.", "supersymmetry.asm."}) @SortingIndex(2001) // random number idk -public class SusyLoadingPlugin implements IFMLLoadingPlugin { +public class SusyLoadingPlugin implements IFMLLoadingPlugin, IEarlyMixinLoader { @Override public String[] getASMTransformerClass() { return new String[]{"supersymmetry.asm.SusyTransformer"}; @@ -40,4 +43,12 @@ public void injectData(Map data) { public String getAccessTransformerClass() { return null; } + + @Override + public List getMixinConfigs() { + String[] configs = { + "mixins.susy.early.json" + }; + return Arrays.asList(configs); + } } diff --git a/src/main/java/supersymmetry/client/ClientProxy.java b/src/main/java/supersymmetry/client/ClientProxy.java index a952c6d2a..bc7bcdf77 100644 --- a/src/main/java/supersymmetry/client/ClientProxy.java +++ b/src/main/java/supersymmetry/client/ClientProxy.java @@ -4,10 +4,13 @@ import gregtech.api.items.metaitem.MetaOreDictItem; import gregtech.api.unification.OreDictUnifier; import gregtech.api.unification.stack.UnificationEntry; +import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.client.resources.I18n; import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; import net.minecraft.util.text.TextFormatting; import net.minecraftforge.client.event.ModelRegistryEvent; +import net.minecraftforge.client.event.TextureStitchEvent; import net.minecraftforge.event.entity.player.ItemTooltipEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; @@ -15,7 +18,6 @@ import net.minecraftforge.fml.relauncher.SideOnly; import org.jetbrains.annotations.NotNull; import supersymmetry.Supersymmetry; -import supersymmetry.api.integration.theoneprobe.TheOneProbeCompatibility; import supersymmetry.api.recipes.catalysts.CatalystGroup; import supersymmetry.api.recipes.catalysts.CatalystInfo; import supersymmetry.common.CommonProxy; @@ -46,7 +48,6 @@ public void load() { super.load(); SuSyMetaBlocks.registerColors(); SuSyFluidTooltipLoader.registerTooltips(); - TheOneProbeCompatibility.registerCompatibility(); } @SubscribeEvent @@ -107,4 +108,10 @@ public static void registerModels(@NotNull ModelRegistryEvent event) { SuSyBlocks.registerItemModels(); SuSyMetaBlocks.registerItemModels(); } + + @SubscribeEvent + public static void stitchTexture(TextureStitchEvent.Pre event) { + TextureMap map = event.getMap(); + map.registerSprite(new ResourceLocation(Supersymmetry.MODID, "armor/jet_wingpack")); + } } diff --git a/src/main/java/supersymmetry/client/audio/MovingSoundJetEngine.java b/src/main/java/supersymmetry/client/audio/MovingSoundJetEngine.java new file mode 100644 index 000000000..02dc7db01 --- /dev/null +++ b/src/main/java/supersymmetry/client/audio/MovingSoundJetEngine.java @@ -0,0 +1,62 @@ +package supersymmetry.client.audio; + +import net.minecraft.client.audio.MovingSound; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.SoundCategory; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; +import supersymmetry.api.sound.SusySounds; + +@SideOnly(Side.CLIENT) +public class MovingSoundJetEngine extends MovingSound { + + private static final float MAX_VOLUME = 1.0F; + private boolean isThrottled = false; + private final EntityPlayer player; + private float baseVolume = 0.0F; + + public MovingSoundJetEngine(EntityPlayer player) { + super(SusySounds.JET_ENGINE_LOOP, SoundCategory.PLAYERS); + this.player = player; + this.repeat = true; + this.repeatDelay = 0; + this.volume = MAX_VOLUME; + } + + public void startPlaying() { + this.baseVolume = MAX_VOLUME; + } + + public void stopPlaying() { + this.baseVolume = 0; + } + + public boolean isThrottled() { + return this.isThrottled; + } + + public void setThrottled(boolean isThrottled) { + this.isThrottled = isThrottled; + } + + public boolean isPlaying() { + return volume > 0.0F; + } + + @Override + public void update() { + if (this.player.isDead) { + this.donePlaying = true; + } else { + this.xPosF = (float) (player.posX + player.motionX); + this.yPosF = (float) (player.posY + player.motionY); + this.zPosF = (float) (player.posZ + player.motionZ); + } + float throttleMultiplier = isThrottled ? 0.2F : 1; + if (volume < baseVolume * throttleMultiplier) { + volume += 0.05F; + } else { + volume -= 0.02F; + } + } +} diff --git a/src/main/java/supersymmetry/client/renderer/handler/JetWingpackModel.java b/src/main/java/supersymmetry/client/renderer/handler/JetWingpackModel.java new file mode 100644 index 000000000..f927060c6 --- /dev/null +++ b/src/main/java/supersymmetry/client/renderer/handler/JetWingpackModel.java @@ -0,0 +1,27 @@ +package supersymmetry.client.renderer.handler; + +import net.minecraft.client.model.ModelBiped; + +import static supersymmetry.api.util.SuSyUtility.susyId; + +public class JetWingpackModel extends ModelBiped { + + public static final JetWingpackModel INSTANCE = new JetWingpackModel(); + private final OBJModelRender objModel; + + public JetWingpackModel() { + this.textureWidth = 128; + this.textureHeight = 128; + + this.bipedHead.cubeList.clear(); + this.bipedHeadwear.cubeList.clear(); + this.bipedBody.cubeList.clear(); + this.bipedRightArm.cubeList.clear(); + this.bipedLeftArm.cubeList.clear(); + this.bipedLeftLeg.cubeList.clear(); + this.bipedRightLeg.cubeList.clear(); + + this.objModel = new OBJModelRender(this, susyId("models/armor/jet_wingpack.obj")); + this.bipedBody.addChild(objModel); + } +} diff --git a/src/main/java/supersymmetry/client/renderer/handler/OBJModelRender.java b/src/main/java/supersymmetry/client/renderer/handler/OBJModelRender.java new file mode 100644 index 000000000..db8efd092 --- /dev/null +++ b/src/main/java/supersymmetry/client/renderer/handler/OBJModelRender.java @@ -0,0 +1,188 @@ +package supersymmetry.client.renderer.handler; + +import codechicken.lib.texture.TextureUtils; +import codechicken.lib.util.TransformUtils; +import net.minecraft.client.Minecraft; +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.client.renderer.BufferBuilder; +import net.minecraft.client.renderer.GLAllocation; +import net.minecraft.client.renderer.GlStateManager; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.block.model.BakedQuad; +import net.minecraft.client.renderer.block.model.IBakedModel; +import net.minecraft.client.renderer.vertex.DefaultVertexFormats; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.Vec3i; +import net.minecraftforge.client.model.obj.OBJLoader; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; +import supersymmetry.api.SusyLog; + +import java.util.List; + + +/** + * A wrapped OBJ IBakedModel + * Mostly copied from Draconic Evolution, with minor modifications. + * + * @author brandon3055 + * Link + */ +@SideOnly(Side.CLIENT) +public class OBJModelRender extends ModelRenderer { + + public float scale = 0; + private int displayList; + private boolean compiled = false; + private IBakedModel objModel; + + public OBJModelRender(ModelBase baseModel, ResourceLocation customModel) { + super(baseModel); + + try { + objModel = OBJLoader.INSTANCE.loadModel(customModel).bake(TransformUtils.DEFAULT_TOOL, DefaultVertexFormats.ITEM, TextureUtils::getTexture); + } catch (Exception e) { + SusyLog.logger.error(e); + } + } + + public static void renderQuads(List listQuads) { + Tessellator tessellator = Tessellator.getInstance(); + BufferBuilder vertexbuffer = tessellator.getBuffer(); + int i = 0; + vertexbuffer.begin(7, DefaultVertexFormats.ITEM); + for (int j = listQuads.size(); i < j; ++i) { + BakedQuad bakedquad = listQuads.get(i); + + vertexbuffer.addVertexData(bakedquad.getVertexData()); + + vertexbuffer.putColorRGB_F4(1, 1, 1); + + Vec3i vec3i = bakedquad.getFace().getDirectionVec(); + vertexbuffer.putNormal((float) vec3i.getX(), (float) vec3i.getY(), (float) vec3i.getZ()); + + } + tessellator.draw(); + } + + @Override + public void render(float scale) { + if (!this.isHidden && this.showModel) { + if (!this.compiled) { + this.compileDisplayList(scale); + } + + GlStateManager.translate(this.offsetX, this.offsetY, this.offsetZ); + + if (this.rotateAngleX == 0.0F && this.rotateAngleY == 0.0F && this.rotateAngleZ == 0.0F) { + if (this.rotationPointX == 0.0F && this.rotationPointY == 0.0F && this.rotationPointZ == 0.0F) { + GlStateManager.callList(this.displayList); + } else { + GlStateManager.translate(this.rotationPointX * scale, this.rotationPointY * scale, this.rotationPointZ * scale); + GlStateManager.callList(this.displayList); + GlStateManager.translate(-this.rotationPointX * scale, -this.rotationPointY * scale, -this.rotationPointZ * scale); + } + } else { + GlStateManager.pushMatrix(); + GlStateManager.translate(this.rotationPointX * scale, this.rotationPointY * scale, this.rotationPointZ * scale); + if (this.rotateAngleZ != 0.0F) { + GlStateManager.rotate(this.rotateAngleZ * 57.295776F, 0.0F, 0.0F, 1.0F); + } + + if (this.rotateAngleY != 0.0F) { + GlStateManager.rotate(this.rotateAngleY * 57.295776F, 0.0F, 1.0F, 0.0F); + } + + if (this.rotateAngleX != 0.0F) { + GlStateManager.rotate(this.rotateAngleX * 57.295776F, 1.0F, 0.0F, 0.0F); + } + + GlStateManager.callList(this.displayList); + GlStateManager.popMatrix(); + } + + GlStateManager.translate(-this.offsetX, -this.offsetY, -this.offsetZ); + } + } + + private void compileDisplayList(float scale) { + if (this.scale == 0) { + this.scale = scale; + } + + if (objModel == null) { + compiled = true; + SusyLog.logger.error("Failed to compile OBJ model!"); + return; + } + + scale = this.scale; + this.displayList = GLAllocation.generateDisplayLists(1); + GlStateManager.glNewList(this.displayList, GL11.GL_COMPILE); + + GlStateManager.pushMatrix(); + GlStateManager.scale(scale, scale, scale); + GlStateManager.rotate(180, -1, 0, 1); + + GlStateManager.bindTexture(Minecraft.getMinecraft().getTextureMapBlocks().getGlTextureId()); + renderQuads(objModel.getQuads(null, null, 0)); + + GlStateManager.popMatrix(); + + GlStateManager.glEndList(); + this.compiled = true; + } + + @Override + public void renderWithRotation(float scale) { + if (!this.isHidden && this.showModel) { + if (!this.compiled) { + this.compileDisplayList(scale); + } + + GlStateManager.pushMatrix(); + GlStateManager.translate(this.rotationPointX * scale, this.rotationPointY * scale, this.rotationPointZ * scale); + if (this.rotateAngleY != 0.0F) { + GlStateManager.rotate(this.rotateAngleY * 57.295776F, 0.0F, 1.0F, 0.0F); + } + + if (this.rotateAngleX != 0.0F) { + GlStateManager.rotate(this.rotateAngleX * 57.295776F, 1.0F, 0.0F, 0.0F); + } + + if (this.rotateAngleZ != 0.0F) { + GlStateManager.rotate(this.rotateAngleZ * 57.295776F, 0.0F, 0.0F, 1.0F); + } + + GlStateManager.callList(this.displayList); + GlStateManager.popMatrix(); + } + } + + @Override + public void postRender(float scale) { + if (!this.isHidden && this.showModel) { + + if (this.rotateAngleX == 0.0F && this.rotateAngleY == 0.0F && this.rotateAngleZ == 0.0F) { + if (this.rotationPointX != 0.0F || this.rotationPointY != 0.0F || this.rotationPointZ != 0.0F) { + GlStateManager.translate(this.rotationPointX * scale, this.rotationPointY * scale, this.rotationPointZ * scale); + } + } else { + GlStateManager.translate(this.rotationPointX * scale, this.rotationPointY * scale, this.rotationPointZ * scale); + if (this.rotateAngleZ != 0.0F) { + GlStateManager.rotate(this.rotateAngleZ * 57.295776F, 0.0F, 0.0F, 1.0F); + } + + if (this.rotateAngleY != 0.0F) { + GlStateManager.rotate(this.rotateAngleY * 57.295776F, 0.0F, 1.0F, 0.0F); + } + + if (this.rotateAngleX != 0.0F) { + GlStateManager.rotate(this.rotateAngleX * 57.295776F, 1.0F, 0.0F, 0.0F); + } + } + } + } +} diff --git a/src/main/java/supersymmetry/client/renderer/textures/SusyTextures.java b/src/main/java/supersymmetry/client/renderer/textures/SusyTextures.java index 25c11f9fa..fa465778c 100644 --- a/src/main/java/supersymmetry/client/renderer/textures/SusyTextures.java +++ b/src/main/java/supersymmetry/client/renderer/textures/SusyTextures.java @@ -4,6 +4,7 @@ import gregtech.client.renderer.texture.cube.SimpleCubeRenderer; import gregtech.client.renderer.texture.cube.SimpleOverlayRenderer; import gregtech.client.renderer.texture.cube.SimpleSidedCubeRenderer; +import supersymmetry.client.renderer.textures.custom.ExtenderRender; import gregtech.client.renderer.texture.custom.DrumRenderer; public class SusyTextures { @@ -13,6 +14,15 @@ public SusyTextures(){ public static final SimpleSidedCubeRenderer WOODEN_COAGULATION_TANK_WALL = new SimpleSidedCubeRenderer("casings/wooden_coagulation_tank_wall"); public static final SimpleSidedCubeRenderer PLASTIC_CAN_OVERLAY = new SimpleSidedCubeRenderer("storage/drums/plastic_can_top"); + public static final SimpleSidedCubeRenderer INV_BRIDGE = new SimpleSidedCubeRenderer("logistics/bridges/inv"); + public static final SimpleSidedCubeRenderer TANK_BRIDGE = new SimpleSidedCubeRenderer("logistics/bridges/tank"); + public static final SimpleSidedCubeRenderer INV_TANK_BRIDGE = new SimpleSidedCubeRenderer("logistics/bridges/inv_tank"); + public static final SimpleSidedCubeRenderer UNIVERSAL_BRIDGE = new SimpleSidedCubeRenderer("logistics/bridges/universal"); + + public static final ExtenderRender INV_EXTENDER = new ExtenderRender("logistics/extenders/inv"); + public static final ExtenderRender TANK_EXTENDER = new ExtenderRender("logistics/extenders/tank"); + public static final ExtenderRender INV_TANK_EXTENDER = new ExtenderRender("logistics/extenders/inv_tank"); + public static final ExtenderRender UNIVERSAL_EXTENDER = new ExtenderRender("logistics/extenders/universal"); public static final OrientedOverlayRenderer VULCANIZING_PRESS_OVERLAY = new OrientedOverlayRenderer("machines/vulcanizing_press"); public static final OrientedOverlayRenderer LATEX_COLLECTOR_OVERLAY = new OrientedOverlayRenderer("machines/latex_collector"); diff --git a/src/main/java/supersymmetry/client/renderer/textures/custom/ExtenderRender.java b/src/main/java/supersymmetry/client/renderer/textures/custom/ExtenderRender.java new file mode 100644 index 000000000..fdc5906a5 --- /dev/null +++ b/src/main/java/supersymmetry/client/renderer/textures/custom/ExtenderRender.java @@ -0,0 +1,55 @@ +package supersymmetry.client.renderer.textures.custom; + +import codechicken.lib.render.CCRenderState; +import codechicken.lib.render.pipeline.IVertexOperation; +import codechicken.lib.texture.TextureUtils.IIconRegister; +import codechicken.lib.vec.Cuboid6; +import codechicken.lib.vec.Matrix4; +import gregtech.api.GTValues; +import gregtech.client.renderer.texture.Textures; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.util.BlockRenderLayer; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +public class ExtenderRender implements IIconRegister { + + private final String basePath; + + @SideOnly(Side.CLIENT) + private TextureAtlasSprite[] textures; + + public ExtenderRender(String basePath) { + this.basePath = basePath; + Textures.iconRegisters.add(this); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(TextureMap textureMap) { + String formattedBase = GTValues.MODID + ":blocks/" + basePath; + this.textures = new TextureAtlasSprite[3]; + this.textures[0] = textureMap.registerSprite(new ResourceLocation(formattedBase + "/in")); + this.textures[1] = textureMap.registerSprite(new ResourceLocation(formattedBase + "/side")); + this.textures[2] = textureMap.registerSprite(new ResourceLocation(formattedBase + "/out")); + } + + @SideOnly(Side.CLIENT) + public void render(CCRenderState renderState, Matrix4 translation, IVertexOperation[] pipeline, + EnumFacing outFace, EnumFacing inFace) { + for (EnumFacing renderSide : EnumFacing.VALUES) { + TextureAtlasSprite baseSprite = renderSide == inFace ? textures[0] : + renderSide == outFace ? textures[2] : textures[1]; + Textures.renderFace(renderState, translation, pipeline, renderSide, Cuboid6.full, baseSprite, + BlockRenderLayer.CUTOUT_MIPPED); + } + } + + @SideOnly(Side.CLIENT) + public TextureAtlasSprite getParticleTexture() { + return textures[0]; + } +} diff --git a/src/main/java/supersymmetry/common/item/SuSyMetaItems.java b/src/main/java/supersymmetry/common/item/SuSyMetaItems.java index 7828217ff..8a34c3ba3 100644 --- a/src/main/java/supersymmetry/common/item/SuSyMetaItems.java +++ b/src/main/java/supersymmetry/common/item/SuSyMetaItems.java @@ -1,6 +1,7 @@ package supersymmetry.common.item; import gregtech.api.GTValues; +import gregtech.api.items.armor.ArmorMetaItem; import gregtech.api.items.metaitem.MetaItem.MetaValueItem; import gregtech.api.items.metaitem.MetaOreDictItem; import gregtech.api.items.metaitem.MetaOreDictItem.OreDictValueItem; @@ -10,6 +11,7 @@ import gregtech.common.items.behaviors.TooltipBehavior; import net.minecraft.client.resources.I18n; import supersymmetry.SuSyValues; +import supersymmetry.common.item.armor.SuSyMetaArmor; public class SuSyMetaItems { @@ -20,13 +22,15 @@ public class SuSyMetaItems { public static MetaValueItem PUMP_STEAM; public static MetaValueItem AIR_VENT; public static MetaValueItem TRACK_SEGMENT; + public static ArmorMetaItem.ArmorMetaValueItem JET_WINGPACK; public static void initMetaItems() { metaItem = new StandardMetaItem(); metaItem.setRegistryName("meta_item"); oreDictItem = new MetaOreDictItem((short) 0); oreDictItem.setRegistryName("susy_oredict_item"); - + SuSyMetaArmor armor = new SuSyMetaArmor(); + armor.setRegistryName("susy_armor"); CatalystItems.init(); } diff --git a/src/main/java/supersymmetry/common/item/armor/JetWingpack.java b/src/main/java/supersymmetry/common/item/armor/JetWingpack.java new file mode 100644 index 000000000..7d5497cba --- /dev/null +++ b/src/main/java/supersymmetry/common/item/armor/JetWingpack.java @@ -0,0 +1,387 @@ +package supersymmetry.common.item.armor; + +import gregtech.api.GTValues; +import gregtech.api.capability.IFilter; +import gregtech.api.capability.impl.GTFluidHandlerItemStack; +import gregtech.api.items.armor.ArmorLogicSuite; +import gregtech.api.items.armor.ArmorMetaItem; +import gregtech.api.items.armor.ArmorUtils; +import gregtech.api.items.metaitem.stats.*; +import gregtech.api.recipes.Recipe; +import gregtech.api.recipes.ingredients.GTRecipeInput; +import gregtech.api.util.GTUtility; +import gregtech.api.util.GradientUtil; +import gregtech.api.util.input.KeyBind; +import net.minecraft.client.Minecraft; +import net.minecraft.client.model.ModelBiped; +import net.minecraft.client.resources.I18n; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.inventory.EntityEquipmentSlot; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.*; +import net.minecraft.util.math.Vec3d; +import net.minecraft.util.text.TextComponentTranslation; +import net.minecraft.world.World; +import net.minecraftforge.common.ISpecialArmor; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.common.capabilities.ICapabilityProvider; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.capability.CapabilityFluidHandler; +import net.minecraftforge.fluids.capability.IFluidHandlerItem; +import net.minecraftforge.fluids.capability.IFluidTankProperties; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; +import org.apache.commons.lang3.tuple.Pair; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; +import supersymmetry.api.capability.IElytraFlyingProvider; +import supersymmetry.api.capability.SuSyCapabilities; +import supersymmetry.api.recipes.SuSyRecipeMaps; +import supersymmetry.api.util.ElytraFlyingUtils; +import supersymmetry.client.audio.MovingSoundJetEngine; +import supersymmetry.client.renderer.handler.JetWingpackModel; + +import java.awt.*; +import java.util.Collections; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.function.Function; + + +public class JetWingpack extends ArmorLogicSuite implements IItemHUDProvider { + + protected static final int TANK_CAPACITY = 32000; + + protected static final int MAX_SPEED = 2; + protected static final double MIN_SPEED = 0.02; + protected static final double THRUST = 0.05D; + protected static final double REVERSE_THRUST = 0.05D; + protected static final double FALLING = 0.005D; + + protected static final ISpecialArmor.ArmorProperties DEFAULT_PROPERTIES = new ISpecialArmor.ArmorProperties(Integer.MIN_VALUE, -2, Integer.MAX_VALUE); + + protected static final Function FUEL_BURN_TIME = fluidStack -> { + Recipe recipe = SuSyRecipeMaps.JET_WINGPACK_FUELS.findRecipe( + GTValues.V[GTValues.MV], + Collections.emptyList(), + Collections.singletonList(fluidStack)); + return recipe != null ? recipe.getDuration() : 0; + }; + + @SideOnly(Side.CLIENT) + private ArmorUtils.ModularHUD HUD; + + @SideOnly(Side.CLIENT) + protected MovingSoundJetEngine jetEngineSound; + + protected JetWingpack() { + super(1, TANK_CAPACITY, GTValues.EV, EntityEquipmentSlot.CHEST); + if (ArmorUtils.SIDE.isClient()) { + this.HUD = new ArmorUtils.ModularHUD(); + } + } + + @SideOnly(Side.CLIENT) + public void drawHUD(@NotNull ItemStack item) { + IFluidHandlerItem tank = item.getCapability(CapabilityFluidHandler.FLUID_HANDLER_ITEM_CAPABILITY, null); + if (tank != null) { + IFluidTankProperties[] prop = tank.getTankProperties(); + if (prop[0] != null && prop[0].getContents() != null) { + if (prop[0].getContents().amount == 0) { + return; + } + + String formated = String.format("%.1f", (float) prop[0].getContents().amount * 100.0F / (float) prop[0].getCapacity()); + this.HUD.newString(I18n.format("metaarmor.hud.fuel_lvl", formated + "%")); + NBTTagCompound data = item.getTagCompound(); + if (data != null && data.hasKey("engineActive")) { + String status = data.getBoolean("engineActive") ? I18n.format("metaarmor.hud.status.enabled") : I18n.format("metaarmor.hud.status.disabled"); + String result = I18n.format("metaarmor.hud.engine_status", status); + this.HUD.newString(result); + } + } + } + + this.HUD.draw(); + this.HUD.reset(); + } + + @Override + public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { + NBTTagCompound data = GTUtility.getOrCreateNbtCompound(itemStack); + + byte toggleTimer = 0; + boolean pressed = false; + boolean wingActive = false; + boolean engineActive = false; + + if (data.hasKey("toggleTimer")) toggleTimer = data.getByte("toggleTimer"); + if (data.hasKey("pressed")) pressed = data.getBoolean("pressed"); + if (data.hasKey("wingActive")) wingActive = data.getBoolean("wingActive"); + if (data.hasKey("engineActive")) engineActive = data.getBoolean("engineActive"); + + if (toggleTimer == 0 && KeyBind.ARMOR_MODE_SWITCH.isKeyDown(player)) { + engineActive = !engineActive; + toggleTimer = 5; + if (!world.isRemote) { + if (engineActive) + player.sendStatusMessage(new TextComponentTranslation("metaarmor.jet_wingpack.engine_active"), true); + else + player.sendStatusMessage(new TextComponentTranslation("metaarmor.jet_wingpack.engine_inactive"), true); + } + } + + if (world.isRemote) { + handleSounds(player, engineActive); + } + + if (engineActive && player.isElytraFlying() && drainFuel(itemStack, getEnergyPerUse(), true)) { + Vec3d lookVec = player.getLookVec(); + if (KeyBind.VANILLA_SNEAK.isKeyDown(player)) { + // handles braking + player.motionX -= REVERSE_THRUST * (player.motionX - MIN_SPEED * lookVec.x); // v(t+1) = v(t) - THRUST * (v(t) - MIN_SPEED) + player.motionY -= REVERSE_THRUST * player.motionY + FALLING; // so that you won't fly upwards when braking + player.motionZ -= REVERSE_THRUST * (player.motionZ - MIN_SPEED * lookVec.z); + } else { + // handles acceleration + player.motionX += THRUST * (MAX_SPEED * lookVec.x - player.motionX); // v(t+1) = v(t) + THRUST * (MAX_SPEED - v(t)) + player.motionY += THRUST * (MAX_SPEED * lookVec.y - player.motionY); // or dv/dt = THRUST * (MAX_SPEED - v) + player.motionZ += THRUST * (MAX_SPEED * lookVec.z - player.motionZ); + world.spawnParticle(EnumParticleTypes.CLOUD, player.posX, player.posY, player.posZ, 0.0, 0.0, 0.0); + } + drainFuel(itemStack, getEnergyPerUse(), false); + } + + if (!pressed && KeyBind.VANILLA_JUMP.isKeyDown(player)) { + pressed = true; + if (!world.isRemote) { + EntityPlayerMP playerMP = (EntityPlayerMP) player; + if (!wingActive) { + if (ElytraFlyingUtils.canTakeOff(playerMP, engineActive)) { + playerMP.setElytraFlying(); + wingActive = true; + } + } else { + playerMP.clearElytraFlying(); + wingActive = false; + } + } + } + + if (pressed && !KeyBind.VANILLA_JUMP.isKeyDown(player)) pressed = false; + if (toggleTimer > 0) toggleTimer--; + + data.setByte("toggleTimer", toggleTimer); + data.setBoolean("pressed", pressed); + data.setBoolean("wingActive", wingActive); + data.setBoolean("engineActive", engineActive); + + player.inventoryContainer.detectAndSendChanges(); + } + + // I hate this... + @SideOnly(Side.CLIENT) + public void handleSounds(EntityPlayer player, boolean engineActive) { + if (this.jetEngineSound == null) { + this.jetEngineSound = new MovingSoundJetEngine(player); + Minecraft.getMinecraft().getSoundHandler().playSound(jetEngineSound); + } + if (engineActive && !jetEngineSound.isPlaying()) { + jetEngineSound.startPlaying(); + } else if (!engineActive && jetEngineSound.isPlaying()) { + jetEngineSound.stopPlaying(); + } + if (jetEngineSound.isThrottled() != KeyBind.VANILLA_SNEAK.isKeyDown(player)) { + jetEngineSound.setThrottled(KeyBind.VANILLA_SNEAK.isKeyDown(player)); + } + } + + @Override + public void addToolComponents(ArmorMetaItem.ArmorMetaValueItem mvi) { + mvi.addComponents(new ElytraFlyingProvider()); + mvi.addComponents(new JetWingpackBehaviour(TANK_CAPACITY)); + } + + @SideOnly(Side.CLIENT) + @Override + public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, EntityEquipmentSlot armorSlot, + ModelBiped defaultModel) { + return JetWingpackModel.INSTANCE; + } + + @Override + public String getArmorTexture(ItemStack stack, Entity entity, EntityEquipmentSlot slot, String type) { + return "susy:textures/armor/jet_wingpack.png"; + } + + @Override + public boolean handleUnblockableDamage(EntityLivingBase entity, @NotNull ItemStack armor, DamageSource source, + double damage, EntityEquipmentSlot equipmentSlot) { + return (source == DamageSource.FLY_INTO_WALL && entity.isElytraFlying()); + } + + @Override + public ISpecialArmor.ArmorProperties getProperties(EntityLivingBase entity, @NotNull ItemStack armor, DamageSource source, double damage, EntityEquipmentSlot slot) { + // triple the amount of kinetic damages :trollface: + return source == DamageSource.FLY_INTO_WALL ? DEFAULT_PROPERTIES : super.getProperties(entity, armor, source, damage, slot); + } + + protected boolean drainFuel(@NotNull ItemStack stack, int amount, boolean simulate) { + NBTTagCompound data = GTUtility.getOrCreateNbtCompound(stack); + short burnTimer = 0; + if (data.hasKey("burnTimer")) burnTimer = data.getShort("burnTimer"); + if (burnTimer > 0) { + if (!simulate) { + data.setShort("burnTimer", (short) (burnTimer - 1)); + } + return true; + } + + IFluidHandlerItem fluidHandler = getFluidHandler(stack); + if (fluidHandler == null) return false; + FluidStack fuelStack = fluidHandler.drain(amount, false); + if (fuelStack == null) return false; + + int burnTime = FUEL_BURN_TIME.apply(fuelStack); + if (burnTime <= 0) return false; + + if (!simulate) { + data.setShort("burnTimer", (short) (burnTime)); + fluidHandler.drain(amount, true); + } + return true; + } + + private IFluidHandlerItem getFluidHandler(ItemStack stack) { + return stack.getCapability(CapabilityFluidHandler.FLUID_HANDLER_ITEM_CAPABILITY, null); + } + + private static class ElytraFlyingProvider implements IItemComponent, IElytraFlyingProvider, ICapabilityProvider, IItemCapabilityProvider { + + @Override + public boolean isElytraFlying(@NotNull EntityLivingBase entity, @NotNull ItemStack itemStack, boolean shouldStop) { + if (entity instanceof EntityPlayer) { + NBTTagCompound data = GTUtility.getOrCreateNbtCompound(itemStack); + if (shouldStop) { + data.setBoolean("wingActive", false); + } + return data.hasKey("wingActive") && data.getBoolean("wingActive"); + } + return false; + } + + @Override + public boolean hasCapability(@NotNull Capability capability, @Nullable EnumFacing facing) { + return capability == SuSyCapabilities.ELYTRA_FLYING_PROVIDER; + } + + @Nullable + @Override + public T getCapability(@NotNull Capability capability, @Nullable EnumFacing facing) { + return capability == SuSyCapabilities.ELYTRA_FLYING_PROVIDER ? SuSyCapabilities.ELYTRA_FLYING_PROVIDER.cast(this) : null; + } + + @Override + public ICapabilityProvider createProvider(ItemStack itemStack) { + return this; + } + } + + public class JetWingpackBehaviour implements IItemDurabilityManager, IItemCapabilityProvider, IItemBehaviour, ISubItemHandler { + + private static final IFilter JET_WINGPACK_FUEL_FILTER = new IFilter<>() { + + @Override + public boolean test(@NotNull FluidStack fluidStack) { + return FUEL_BURN_TIME.apply(fluidStack) > 0; + } + + @Override + public int getPriority() { + return IFilter.whitelistLikePriority(); + } + }; + + public final int maxCapacity; + private final Pair durabilityBarColors; + + public JetWingpackBehaviour(int internalCapacity) { + this.maxCapacity = internalCapacity; + this.durabilityBarColors = GradientUtil.getGradient(0xB7AF08, 10); + } + + @Override + public double getDurabilityForDisplay(@NotNull ItemStack itemStack) { + IFluidHandlerItem fluidHandlerItem = itemStack + .getCapability(CapabilityFluidHandler.FLUID_HANDLER_ITEM_CAPABILITY, null); + if (fluidHandlerItem == null) return 0; + IFluidTankProperties fluidTankProperties = fluidHandlerItem.getTankProperties()[0]; + FluidStack fluidStack = fluidTankProperties.getContents(); + return fluidStack == null ? 0 : (double) fluidStack.amount / (double) fluidTankProperties.getCapacity(); + } + + @Nullable + @Override + public Pair getDurabilityColorsForDisplay(ItemStack itemStack) { + return durabilityBarColors; + } + + @Override + public ICapabilityProvider createProvider(ItemStack itemStack) { + return new GTFluidHandlerItemStack(itemStack, maxCapacity) + .setFilter(JET_WINGPACK_FUEL_FILTER); + } + + @Override + public void addInformation(ItemStack itemStack, List lines) { + IItemBehaviour.super.addInformation(itemStack, lines); + NBTTagCompound data = GTUtility.getOrCreateNbtCompound(itemStack); + String status = I18n.format("metaarmor.hud.status.disabled"); + if (data.hasKey("engineActive")) { + if (data.getBoolean("engineActive")) + status = I18n.format("metaarmor.hud.status.enabled"); + } + lines.add(I18n.format("metaarmor.hud.engine_status", status)); + } + + @Override + public ActionResult onItemRightClick(World world, EntityPlayer player, EnumHand hand) { + return onRightClick(world, player, hand); + } + + @Override + public String getItemSubType(ItemStack itemStack) { + return ""; + } + + @Override + public void getSubItems(ItemStack itemStack, CreativeTabs creativeTab, NonNullList subItems) { + ItemStack copy = itemStack.copy(); + IFluidHandlerItem fluidHandlerItem = copy.getCapability(CapabilityFluidHandler.FLUID_HANDLER_ITEM_CAPABILITY, null); + if (fluidHandlerItem != null) { + Optional firstRecipe = SuSyRecipeMaps.JET_WINGPACK_FUELS.getRecipeList().stream().findFirst(); + firstRecipe.ifPresent(recipe -> { + Optional inputFluidStack = recipe.getFluidInputs().stream() + .map(GTRecipeInput::getInputFluidStack) + .filter(Objects::nonNull) + .findFirst(); + inputFluidStack.ifPresent(stack -> { + Fluid fluid = stack.getFluid(); + if (fluid != null && stack.amount > 0) { + fluidHandlerItem.fill(new FluidStack(fluid, maxCapacity), true); + subItems.add(copy); + } + }); + }); + } + subItems.add(itemStack); + } + } +} diff --git a/src/main/java/supersymmetry/common/item/armor/SuSyMetaArmor.java b/src/main/java/supersymmetry/common/item/armor/SuSyMetaArmor.java new file mode 100644 index 000000000..f25bab9cf --- /dev/null +++ b/src/main/java/supersymmetry/common/item/armor/SuSyMetaArmor.java @@ -0,0 +1,12 @@ +package supersymmetry.common.item.armor; + +import gregtech.api.items.armor.ArmorMetaItem; +import supersymmetry.common.item.SuSyMetaItems; + +public class SuSyMetaArmor extends ArmorMetaItem.ArmorMetaValueItem> { + + @Override + public void registerSubItems() { + SuSyMetaItems.JET_WINGPACK = addItem(1, "jet_wingpack").setArmorLogic(new JetWingpack()); + } +} diff --git a/src/main/java/supersymmetry/common/metatileentities/SuSyMetaTileEntities.java b/src/main/java/supersymmetry/common/metatileentities/SuSyMetaTileEntities.java index 2a1b78a3d..7c4e2bb15 100644 --- a/src/main/java/supersymmetry/common/metatileentities/SuSyMetaTileEntities.java +++ b/src/main/java/supersymmetry/common/metatileentities/SuSyMetaTileEntities.java @@ -16,6 +16,8 @@ import gregtech.common.metatileentities.multi.multiblockpart.MetaTileEntityMultiFluidHatch; import gregtech.common.metatileentities.storage.MetaTileEntityDrum; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fluids.capability.CapabilityFluidHandler; +import net.minecraftforge.items.CapabilityItemHandler; import org.jetbrains.annotations.NotNull; import supersymmetry.api.SusyLog; import supersymmetry.api.metatileentity.CatalystMachineMetaTileEntity; @@ -27,6 +29,8 @@ import supersymmetry.api.recipes.SuSyRecipeMaps; import supersymmetry.api.util.SuSyUtility; import supersymmetry.client.renderer.textures.SusyTextures; +import supersymmetry.common.metatileentities.logistics.MetaTileEntityBridge; +import supersymmetry.common.metatileentities.logistics.MetaTileEntityExtender; import supersymmetry.common.metatileentities.multi.electric.*; import supersymmetry.common.metatileentities.multi.primitive.MetaTileEntityCoagulationTank; import supersymmetry.common.metatileentities.multi.primitive.MetaTileEntityPrimitiveMudPump; @@ -41,6 +45,7 @@ import supersymmetry.common.metatileentities.single.steam.SuSySimpleSteamMetaTileEntity; import supersymmetry.common.metatileentities.storage.MetaTileEntityPlasticCan; +import java.util.ArrayList; import java.util.function.Function; import static gregtech.api.util.GTUtility.gregtechId; @@ -164,6 +169,16 @@ public class SuSyMetaTileEntities { public static MetaTileEntitySieveDistillationTower SIEVE_DISTILLATION_TOWER; + public static MetaTileEntityBridge INV_BRIDGE; + public static MetaTileEntityBridge TANK_BRIDGE; + public static MetaTileEntityBridge INV_TANK_BRIDGE; + public static MetaTileEntityBridge UNIVERSAL_BRIDGE; + + public static MetaTileEntityExtender INV_EXTENDER; + public static MetaTileEntityExtender TANK_EXTENDER; + public static MetaTileEntityExtender INV_TANK_EXTENDER; + public static MetaTileEntityExtender UNIVERSAL_EXTENDER; + public static final MetaTileEntityMultiFluidHatch[] SUSY_QUADRUPLE_IMPORT_HATCH = new MetaTileEntityMultiFluidHatch[3]; // LV-HV public static final MetaTileEntityMultiFluidHatch[] SUSY_NONUPLE_IMPORT_HATCH = new MetaTileEntityMultiFluidHatch[3]; // LV-HV public static final MetaTileEntityMultiFluidHatch[] SUSY_QUADRUPLE_EXPORT_HATCH = new MetaTileEntityMultiFluidHatch[3]; // LV-HV @@ -221,6 +236,16 @@ public static void init() { ELECTROLYTIC_CELL = registerMetaTileEntity(14634, new MetaTileEntityElectrolyticCell(susyId("electrolytic_cell"))); GRAVITY_SEPARATOR = registerMetaTileEntity(15052, new MetaTileEntityGravitySeparator(susyId("gravity_separator"))); + INV_BRIDGE = registerMetaTileEntity(14733, new MetaTileEntityBridge(susyId("bridge.inv"), cap -> cap == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, SusyTextures.INV_BRIDGE, Materials.Steel)); + TANK_BRIDGE = registerMetaTileEntity(14734, new MetaTileEntityBridge(susyId("bridge.tank"), cap -> cap == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, SusyTextures.TANK_BRIDGE, Materials.Steel)); + INV_TANK_BRIDGE = registerMetaTileEntity(14735, new MetaTileEntityBridge(susyId("bridge.inv_tank"), cap -> cap == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY || cap == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, SusyTextures.INV_TANK_BRIDGE, Materials.Steel)); + UNIVERSAL_BRIDGE = registerMetaTileEntity(14736, new MetaTileEntityBridge(susyId("bridge.universal"), cap -> true, SusyTextures.UNIVERSAL_BRIDGE, Materials.Aluminium)); + + INV_EXTENDER = registerMetaTileEntity(14737, new MetaTileEntityExtender(susyId("extender.inv"), cap -> cap == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, SusyTextures.INV_EXTENDER, Materials.Steel)); + TANK_EXTENDER = registerMetaTileEntity(14738, new MetaTileEntityExtender(susyId("extender.tank"), cap -> cap == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, SusyTextures.TANK_EXTENDER, Materials.Steel)); + INV_TANK_EXTENDER = registerMetaTileEntity(14739, new MetaTileEntityExtender(susyId("extender.inv_tank"), cap -> cap == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY || cap == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, SusyTextures.INV_TANK_EXTENDER, Materials.Steel)); + UNIVERSAL_EXTENDER = registerMetaTileEntity(14740, new MetaTileEntityExtender(susyId("extender.universal"), cap -> true, SusyTextures.UNIVERSAL_EXTENDER, Materials.Aluminium)); + PRIMITIVE_SMELTER = registerMetaTileEntity(14800, new MetaTileEntityPrimitiveSmelter(susyId("primitive_smelter"))); PRIMITIVE_ITEM_IMPORT = registerMetaTileEntity(14801, new MetaTileEntityPrimitiveItemBus(susyId("primitive_item_import"), false)); PRIMITIVE_ITEM_EXPORT = registerMetaTileEntity(14802, new MetaTileEntityPrimitiveItemBus(susyId("primitive_item_export"), true)); @@ -237,9 +262,11 @@ public static void init() { registerSimpleMTE(CVD, 12, 14653, "cvd", SuSyRecipeMaps.CVD_RECIPES, SusyTextures.CVD_OVERLAY, true, GTUtility.defaultTankSizeFunction); registerSimpleMTE(ION_IMPLANTER, 12, 14666, "ion_implanter", SuSyRecipeMaps.ION_IMPLANTATION_RECIPES, SusyTextures.ION_IMPLANTER_OVERLAY, true, GTUtility.defaultTankSizeFunction); - int id = 14500; - while (GregTechAPI.MTE_REGISTRY.getObjectById(id) != null) id++; - SusyLog.logger.debug("The next available ID is: " + id); + ArrayList ids = new ArrayList<>(); + for (int id = 14500; id < 15000; id++) { + if (GregTechAPI.MTE_REGISTRY.getObjectById(id) == null) ids.add(id); + } + SusyLog.logger.debug("Available ID(s) are: {}", ids); //thermodynamic stuff registerSimpleMTE(FLUID_COMPRESSOR, 12, 15000, "fluid_compressor", SuSyRecipeMaps.FLUID_COMPRESSOR_RECIPES, SusyTextures.FLUID_COMPRESSOR_OVERLAY, true, GTUtility.defaultTankSizeFunction); diff --git a/src/main/java/supersymmetry/common/metatileentities/logistics/MetaTileEntityBridge.java b/src/main/java/supersymmetry/common/metatileentities/logistics/MetaTileEntityBridge.java new file mode 100644 index 000000000..37b2b7fed --- /dev/null +++ b/src/main/java/supersymmetry/common/metatileentities/logistics/MetaTileEntityBridge.java @@ -0,0 +1,52 @@ +package supersymmetry.common.metatileentities.logistics; + +import codechicken.lib.render.CCRenderState; +import codechicken.lib.render.pipeline.IVertexOperation; +import codechicken.lib.vec.Matrix4; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.interfaces.IGregTechTileEntity; +import gregtech.api.unification.material.Material; +import gregtech.client.renderer.ICubeRenderer; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.common.capabilities.Capability; +import org.jetbrains.annotations.Nullable; +import supersymmetry.api.metatileentity.logistics.MetaTileEntityDelegator; + +import java.util.function.Predicate; + +public class MetaTileEntityBridge extends MetaTileEntityDelegator { + + protected final ICubeRenderer renderer; + + public MetaTileEntityBridge(ResourceLocation metaTileEntityId, Predicate> capFilter, ICubeRenderer renderer, Material baseMaterial) { + this(metaTileEntityId, capFilter, renderer, baseMaterial.getMaterialRGB()); + } + + public MetaTileEntityBridge(ResourceLocation metaTileEntityId, Predicate> capFilter, ICubeRenderer renderer, int baseColor) { + super(metaTileEntityId, capFilter, baseColor); + this.renderer = renderer; + } + + @Override + public MetaTileEntity createMetaTileEntity(IGregTechTileEntity iGregTechTileEntity) { + return new MetaTileEntityBridge(metaTileEntityId, capFilter, renderer, baseColor); + } + + @Override + @Nullable + public EnumFacing getDelegatingFacing(EnumFacing facing) { + return facing == null ? null : facing.getOpposite(); + } + + @Override + public boolean hasFrontFacing() { + return false; + } + + @Override + public void renderMetaTileEntity(CCRenderState renderState, Matrix4 translation, IVertexOperation[] pipeline) { + super.renderMetaTileEntity(renderState, translation, pipeline); + this.renderer.render(renderState, translation, pipeline); + } +} diff --git a/src/main/java/supersymmetry/common/metatileentities/logistics/MetaTileEntityExtender.java b/src/main/java/supersymmetry/common/metatileentities/logistics/MetaTileEntityExtender.java new file mode 100644 index 000000000..2812863de --- /dev/null +++ b/src/main/java/supersymmetry/common/metatileentities/logistics/MetaTileEntityExtender.java @@ -0,0 +1,146 @@ +package supersymmetry.common.metatileentities.logistics; + +import codechicken.lib.raytracer.CuboidRayTraceResult; +import codechicken.lib.render.CCRenderState; +import codechicken.lib.render.pipeline.IVertexOperation; +import codechicken.lib.vec.Matrix4; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.interfaces.IGregTechTileEntity; +import gregtech.api.unification.material.Material; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.PacketBuffer; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumHand; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; +import net.minecraftforge.common.capabilities.Capability; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; +import supersymmetry.api.metatileentity.logistics.MetaTileEntityDelegator; +import supersymmetry.client.renderer.textures.custom.ExtenderRender; + +import java.util.List; +import java.util.function.Predicate; + +import static gregtech.api.capability.GregtechDataCodes.UPDATE_OUTPUT_FACING; + +public class MetaTileEntityExtender extends MetaTileEntityDelegator { + + protected final ExtenderRender renderer; + protected EnumFacing inputFacing; + + public MetaTileEntityExtender(ResourceLocation metaTileEntityId, Predicate> capFilter, ExtenderRender renderer, Material baseMaterial) { + this(metaTileEntityId, capFilter, renderer, baseMaterial.getMaterialRGB()); + } + + public MetaTileEntityExtender(ResourceLocation metaTileEntityId, Predicate> capFilter, ExtenderRender renderer, int baseColor) { + super(metaTileEntityId, capFilter, baseColor); + this.renderer = renderer; + } + + @Override + public MetaTileEntity createMetaTileEntity(IGregTechTileEntity iGregTechTileEntity) { + return new MetaTileEntityExtender(metaTileEntityId, capFilter, renderer, baseColor); + } + + @Override + @Nullable + public EnumFacing getDelegatingFacing(EnumFacing facing) { + return facing == getFrontFacing() ? inputFacing : getFrontFacing(); + } + + @Override + public void renderMetaTileEntity(CCRenderState renderState, Matrix4 translation, IVertexOperation[] pipeline) { + super.renderMetaTileEntity(renderState, translation, pipeline); + this.renderer.render(renderState, translation, pipeline, getFrontFacing(), inputFacing); + } + + @Override + public boolean onWrenchClick(EntityPlayer playerIn, EnumHand hand, EnumFacing facing, + CuboidRayTraceResult hitResult) { + if (!playerIn.isSneaking()) { + if (getInputFacing() == facing || facing == getFrontFacing()) return false; + if (!getWorld().isRemote) { + setInputFacing(facing); + } + return true; + } + return super.onWrenchClick(playerIn, hand, facing, hitResult); + } + + @Override + public NBTTagCompound writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + data.setInteger("InputFacing", getInputFacing().getIndex()); + return data; + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.inputFacing = EnumFacing.VALUES[data.getInteger("InputFacing")]; + } + + @Override + public void writeInitialSyncData(@NotNull PacketBuffer buf) { + super.writeInitialSyncData(buf); + buf.writeByte(getInputFacing().getIndex()); + } + + @Override + public void receiveInitialSyncData(@NotNull PacketBuffer buf) { + super.receiveInitialSyncData(buf); + this.inputFacing = EnumFacing.VALUES[buf.readByte()]; + } + + + @Override + public void receiveCustomData(int dataId, @NotNull PacketBuffer buf) { + super.receiveCustomData(dataId, buf); + if (dataId == UPDATE_OUTPUT_FACING) { + this.inputFacing = EnumFacing.VALUES[buf.readByte()]; + scheduleRenderUpdate(); + } + } + + @Override + public boolean isValidFrontFacing(EnumFacing facing) { + return facing != getFrontFacing() && facing != inputFacing; + } + + @Override + public void setFrontFacing(EnumFacing frontFacing) { + super.setFrontFacing(frontFacing); + if (this.inputFacing == null) { + // set initial input facing as opposite to output (front) + setInputFacing(frontFacing.getOpposite()); + } + } + + public EnumFacing getInputFacing() { + return inputFacing == null ? EnumFacing.SOUTH : inputFacing; + } + + public void setInputFacing(EnumFacing inputFacing) { + this.inputFacing = inputFacing; + if (!getWorld().isRemote) { + notifyBlockUpdate(); + writeCustomData(UPDATE_OUTPUT_FACING, buf -> buf.writeByte(inputFacing.getIndex())); + markDirty(); + } + } + + @Override + public boolean needsSneakToRotate() { + return true; + } + + @Override + public void addToolUsages(ItemStack stack, @Nullable World world, List tooltip, boolean advanced) { + tooltip.add(I18n.format("gregtech.tool_action.wrench.set_facing")); + super.addToolUsages(stack, world, tooltip, advanced); + } +} diff --git a/src/main/java/supersymmetry/common/metatileentities/multi/electric/MetaTileEntityEvaporationPool.java b/src/main/java/supersymmetry/common/metatileentities/multi/electric/MetaTileEntityEvaporationPool.java index e5a766a65..fe1f2d76a 100644 --- a/src/main/java/supersymmetry/common/metatileentities/multi/electric/MetaTileEntityEvaporationPool.java +++ b/src/main/java/supersymmetry/common/metatileentities/multi/electric/MetaTileEntityEvaporationPool.java @@ -35,7 +35,10 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.PacketBuffer; -import net.minecraft.util.*; +import net.minecraft.util.BlockRenderLayer; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumParticleTypes; +import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.BlockPos; import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.TextFormatting; @@ -47,11 +50,11 @@ import org.jetbrains.annotations.NotNull; import supersymmetry.api.SusyLog; import supersymmetry.api.capability.impl.EvapRecipeLogic; -import supersymmetry.api.integration.EvaporationPoolInfoProvider; import supersymmetry.api.recipes.SuSyRecipeMaps; import supersymmetry.api.recipes.properties.EvaporationEnergyProperty; import supersymmetry.common.blocks.BlockEvaporationBed; import supersymmetry.common.blocks.SuSyBlocks; +import supersymmetry.integration.theoneprobe.provider.EvaporationPoolInfoProvider; import javax.annotation.Nonnull; import java.util.*; diff --git a/src/main/java/supersymmetry/integration/theoneprobe/TheOneProbeModule.java b/src/main/java/supersymmetry/integration/theoneprobe/TheOneProbeModule.java new file mode 100644 index 000000000..9ee608bbf --- /dev/null +++ b/src/main/java/supersymmetry/integration/theoneprobe/TheOneProbeModule.java @@ -0,0 +1,29 @@ +package supersymmetry.integration.theoneprobe; + +import gregtech.api.modules.GregTechModule; +import gregtech.api.util.Mods; +import gregtech.integration.IntegrationSubmodule; +import mcjty.theoneprobe.TheOneProbe; +import mcjty.theoneprobe.api.ITheOneProbe; +import net.minecraftforge.fml.common.event.FMLInitializationEvent; +import supersymmetry.Supersymmetry; +import supersymmetry.integration.theoneprobe.provider.DelegatorInfoProvider; +import supersymmetry.integration.theoneprobe.provider.EvaporationPoolInfoProvider; +import supersymmetry.modules.SuSyModules; + +@GregTechModule( + moduleID = SuSyModules.MODULE_TOP, + containerID = Supersymmetry.MODID, + modDependencies = Mods.Names.THE_ONE_PROBE, + name = "SuSy TheOneProbe Integration", + description = "SuSy TheOneProbe Integration Module") +public class TheOneProbeModule extends IntegrationSubmodule { + + @Override + public void init(FMLInitializationEvent event) { + getLogger().info("TheOneProbe found. Enabling SuSy top integration..."); + ITheOneProbe oneProbe = TheOneProbe.theOneProbeImp; + oneProbe.registerProvider(new EvaporationPoolInfoProvider()); + oneProbe.registerProvider(new DelegatorInfoProvider()); + } +} diff --git a/src/main/java/supersymmetry/integration/theoneprobe/provider/DelegatorInfoProvider.java b/src/main/java/supersymmetry/integration/theoneprobe/provider/DelegatorInfoProvider.java new file mode 100644 index 000000000..412b4e613 --- /dev/null +++ b/src/main/java/supersymmetry/integration/theoneprobe/provider/DelegatorInfoProvider.java @@ -0,0 +1,38 @@ +package supersymmetry.integration.theoneprobe.provider; + +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.interfaces.IGregTechTileEntity; +import mcjty.theoneprobe.api.IProbeHitData; +import mcjty.theoneprobe.api.IProbeInfo; +import mcjty.theoneprobe.api.IProbeInfoProvider; +import mcjty.theoneprobe.api.ProbeMode; +import net.minecraft.block.state.IBlockState; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import supersymmetry.Supersymmetry; +import supersymmetry.api.metatileentity.logistics.IDelegator; + +public class DelegatorInfoProvider implements IProbeInfoProvider { + + @Override + public String getID() { + return Supersymmetry.MODID + ":delegator_info_provider"; + } + + @Override + public void addProbeInfo(ProbeMode mode, IProbeInfo probeInfo, EntityPlayer player, World world, IBlockState state, + IProbeHitData data) { + if (state.getBlock().hasTileEntity(state)) { + TileEntity te = world.getTileEntity(data.getPos()); + if (te instanceof IGregTechTileEntity igtte) { + MetaTileEntity mte = igtte.getMetaTileEntity(); + if (mte instanceof IDelegator delegator) { + probeInfo.text(I18n.format("gregtech.top.delegator.delegating_face", + delegator.getDelegatingFacing(data.getSideHit()))); + } + } + } + } +} diff --git a/src/main/java/supersymmetry/api/integration/EvaporationPoolInfoProvider.java b/src/main/java/supersymmetry/integration/theoneprobe/provider/EvaporationPoolInfoProvider.java similarity index 97% rename from src/main/java/supersymmetry/api/integration/EvaporationPoolInfoProvider.java rename to src/main/java/supersymmetry/integration/theoneprobe/provider/EvaporationPoolInfoProvider.java index 48d6b42f0..a5df2c75a 100644 --- a/src/main/java/supersymmetry/api/integration/EvaporationPoolInfoProvider.java +++ b/src/main/java/supersymmetry/integration/theoneprobe/provider/EvaporationPoolInfoProvider.java @@ -1,4 +1,4 @@ -package supersymmetry.api.integration; +package supersymmetry.integration.theoneprobe.provider; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.interfaces.IGregTechTileEntity; diff --git a/src/main/java/supersymmetry/mixins/minecraft/EntityPlayerMixin.java b/src/main/java/supersymmetry/mixins/minecraft/EntityPlayerMixin.java new file mode 100644 index 000000000..c278bb0fe --- /dev/null +++ b/src/main/java/supersymmetry/mixins/minecraft/EntityPlayerMixin.java @@ -0,0 +1,20 @@ +package supersymmetry.mixins.minecraft; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.world.World; +import org.spongepowered.asm.mixin.Mixin; +import supersymmetry.api.util.ElytraFlyingUtils; + +@Mixin(EntityPlayer.class) +public abstract class EntityPlayerMixin extends EntityLivingBase { + + public EntityPlayerMixin(World worldIn) { + super(worldIn); + } + + @Override + public boolean isElytraFlying() { + return super.isElytraFlying() || ElytraFlyingUtils.isElytraFlying(this); + } +} diff --git a/src/main/java/supersymmetry/modules/SuSyModules.java b/src/main/java/supersymmetry/modules/SuSyModules.java index 3924cd29a..b8731b7a9 100644 --- a/src/main/java/supersymmetry/modules/SuSyModules.java +++ b/src/main/java/supersymmetry/modules/SuSyModules.java @@ -10,6 +10,7 @@ public class SuSyModules implements IModuleContainer { public static final String MODULE_CORE = "susy_core"; public static final String MODULE_BDSAndM = "bdsandm_integration"; public static final String MODULE_BAUBLES = "baubles_integration"; + public static final String MODULE_TOP = "susy_top_integration"; @Override public String getID() { diff --git a/src/main/resources/assets/gregtech/models/item/metaitems/jet_wingpack.json b/src/main/resources/assets/gregtech/models/item/metaitems/jet_wingpack.json new file mode 100644 index 000000000..40fba5d02 --- /dev/null +++ b/src/main/resources/assets/gregtech/models/item/metaitems/jet_wingpack.json @@ -0,0 +1,6 @@ +{ + "parent" : "item/generated", + "textures" : { + "layer0" : "gregtech:items/metaitems/jet_wingpack" + } +} diff --git a/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/inv/bottom.png b/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/inv/bottom.png new file mode 100644 index 000000000..74e85c7c4 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/inv/bottom.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/inv/side.png b/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/inv/side.png new file mode 100644 index 000000000..74e85c7c4 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/inv/side.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/inv/top.png b/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/inv/top.png new file mode 100644 index 000000000..74e85c7c4 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/inv/top.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/inv_tank/bottom.png b/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/inv_tank/bottom.png new file mode 100644 index 000000000..b646bcaec Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/inv_tank/bottom.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/inv_tank/side.png b/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/inv_tank/side.png new file mode 100644 index 000000000..b646bcaec Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/inv_tank/side.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/inv_tank/top.png b/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/inv_tank/top.png new file mode 100644 index 000000000..b646bcaec Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/inv_tank/top.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/tank/bottom.png b/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/tank/bottom.png new file mode 100644 index 000000000..880e4b753 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/tank/bottom.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/tank/side.png b/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/tank/side.png new file mode 100644 index 000000000..880e4b753 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/tank/side.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/tank/top.png b/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/tank/top.png new file mode 100644 index 000000000..880e4b753 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/tank/top.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/universal/bottom.png b/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/universal/bottom.png new file mode 100644 index 000000000..3a0018f98 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/universal/bottom.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/universal/side.png b/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/universal/side.png new file mode 100644 index 000000000..3a0018f98 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/universal/side.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/universal/top.png b/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/universal/top.png new file mode 100644 index 000000000..3a0018f98 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/logistics/bridges/universal/top.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/inv/in.png b/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/inv/in.png new file mode 100644 index 000000000..74e85c7c4 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/inv/in.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/inv/out.png b/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/inv/out.png new file mode 100644 index 000000000..d3820edf5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/inv/out.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/inv/side.png b/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/inv/side.png new file mode 100644 index 000000000..06a796bbe Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/inv/side.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/inv_tank/in.png b/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/inv_tank/in.png new file mode 100644 index 000000000..b646bcaec Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/inv_tank/in.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/inv_tank/out.png b/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/inv_tank/out.png new file mode 100644 index 000000000..aaaa00625 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/inv_tank/out.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/inv_tank/side.png b/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/inv_tank/side.png new file mode 100644 index 000000000..06a796bbe Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/inv_tank/side.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/tank/in.png b/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/tank/in.png new file mode 100644 index 000000000..880e4b753 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/tank/in.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/tank/out.png b/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/tank/out.png new file mode 100644 index 000000000..1c5a639fe Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/tank/out.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/tank/side.png b/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/tank/side.png new file mode 100644 index 000000000..06a796bbe Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/tank/side.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/universal/in.png b/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/universal/in.png new file mode 100644 index 000000000..3a0018f98 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/universal/in.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/universal/out.png b/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/universal/out.png new file mode 100644 index 000000000..b98e184e9 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/universal/out.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/universal/side.png b/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/universal/side.png new file mode 100644 index 000000000..c0c0a3709 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/logistics/extenders/universal/side.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/metaitems/jet_wingpack.png b/src/main/resources/assets/gregtech/textures/items/metaitems/jet_wingpack.png new file mode 100644 index 000000000..7cdc8dcb4 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/metaitems/jet_wingpack.png differ diff --git a/src/main/resources/assets/susy/lang/en_us.lang b/src/main/resources/assets/susy/lang/en_us.lang index b6a78b7c4..df7361e3d 100644 --- a/src/main/resources/assets/susy/lang/en_us.lang +++ b/src/main/resources/assets/susy/lang/en_us.lang @@ -722,6 +722,7 @@ recipemap.large_steam_turbine.name=Large Steam Turbine recipemap.primitive_smelter.name=Primitive Smelting recipemap.large_fluid_pump.name=Large Fluid Pump recipemap.sieve_distillation.name=Fractional Distillation +recipemap.jet_wingpack_fuels.name=Jet Wingpack Fuels gregtech.multiblock.primitive_mud_pump.description=The Primitive Mud Pump is a Steam Era multiblock that collects mud once per second, but only if it is in a river biome, and when the controller is between Y = 64 and Y = 80 (Inclusive). It can use a Pump, ULV, or LV Output Hatch. gregtech.multiblock.ocean_pumper.description=The Ocean Pumper is an electrically powered multiblock that collects a base amount of 8,000 L Seawater per second (at MV), but only if it is in an ocean biome, and when the controller is between Y = 70 and Y = 75 (Inclusive). It needs an output hatch, a maintenance hatch, and an energy input hatch. @@ -755,7 +756,6 @@ gregtech.machine.fluid_hatch.export_9x.mv.name=MV Nonuple Output Hatch gregtech.machine.fluid_hatch.export_9x.hv.name=HV Nonuple Output Hatch # Other multiblock parts - gregtech.machine.dumping_hatch=Dumping Hatch gregtech.machine.dumping_hatch.lv.name=Dumping Hatch @@ -763,6 +763,28 @@ gregtech.machine.dumping_hatch.lv.name=Dumping Hatch gregtech.machine.ordered_dt.tooltip.1=Fluid input and output hatches are on the same layers gregtech.machine.ordered_dt.tooltip.2=§cNot putting a fluid output in the Nth layer from the bottom voids the Nth output§7 +# Logistics +gregtech.machine.delegator.tooltip.non_recursion=§6Cannot be attached to other Delegators! +gregtech.top.delegator.delegating_face=Delegating: %s + +gregtech.machine.bridge.inv.name=Inventory Bridge +gregtech.machine.bridge.inv.tooltip=§bRelays Inventories +gregtech.machine.bridge.tank.name=Tank Bridge +gregtech.machine.bridge.tank.tooltip=§bRelays Tanks +gregtech.machine.bridge.inv_tank.name=Inventory and Tank Bridge +gregtech.machine.bridge.inv_tank.tooltip=§bRelays Inventories and Tanks +gregtech.machine.bridge.universal.name=Universal Bridge +gregtech.machine.bridge.universal.tooltip=§bRelays Everything + +gregtech.machine.extender.inv.name=Inventory Extender +gregtech.machine.extender.inv.tooltip=§bRelays Inventories +gregtech.machine.extender.tank.name=Tank Extender +gregtech.machine.extender.tank.tooltip=§bRelays Tanks +gregtech.machine.extender.inv_tank.name=Inventory and Tank Extender +gregtech.machine.extender.inv_tank.tooltip=§bRelays Inventories and Tanks +gregtech.machine.extender.universal.name=Universal Extender +gregtech.machine.extender.universal.tooltip=§bRelays Everything + # Metaitems metaitem.catalyst_bed_support_grid.name=Catalyst Bed Support Grid metaitem.conveyor.steam.name=Steam Conveyor @@ -828,6 +850,13 @@ gregtech.catalyst_group.standard_catalysts.name=Standard Catalyst gregtech.catalyst_group.cracking_catalyst_beds.name=Cracking Catalyst metaitem.standard_catalyst_bed_cracking.name=Cracking Catalyst Bed +# Armors +metaitem.jet_wingpack.name=Jet Wingpack +metaitem.jet_wingpack.tooltip=Hold shift to brake when engine activated +metaarmor.hud.engine_status=Engine: %s +metaarmor.jet_wingpack.engine_active=Jet Wingpack: Engine Activated +metaarmor.jet_wingpack.engine_inactive=Jet Wingpack: Engine Deactivated + # Machine Translations susy.ocean_pumper.full=Tanks are Full! susy.ocean_pumper.drainrate=Current Pumping Rate: %s diff --git a/src/main/resources/assets/susy/models/armor/jet_wingpack.mtl b/src/main/resources/assets/susy/models/armor/jet_wingpack.mtl new file mode 100644 index 000000000..60186c958 --- /dev/null +++ b/src/main/resources/assets/susy/models/armor/jet_wingpack.mtl @@ -0,0 +1,11 @@ +# Made with Blockbench & Blender + +newmtl JetWingpack +Ns 0.000000 +Ka 1.000000 1.000000 1.000000 +Ks 0.000000 0.000000 0.000000 +Ke 0.000000 0.000000 0.000000 +Ni 1.500000 +illum 1 +map_Kd susy:armor/jet_wingpack +map_d susy:armor/jet_wingpack diff --git a/src/main/resources/assets/susy/models/armor/jet_wingpack.obj b/src/main/resources/assets/susy/models/armor/jet_wingpack.obj new file mode 100644 index 000000000..d72bedd9b --- /dev/null +++ b/src/main/resources/assets/susy/models/armor/jet_wingpack.obj @@ -0,0 +1,761 @@ +# Made with Blockbench & Blender + +mtllib jet_wingpack.mtl +o cuboid +v -3.651691 -9.716561 -12.500000 +v -1.651691 -9.716561 -12.500000 +v -3.651691 -15.716561 -12.500001 +v -1.651692 -15.716561 -12.500001 +v -3.651692 -9.716561 -11.500000 +v -1.651692 -9.716561 -11.500000 +v -3.651693 -15.716561 -11.500001 +v -1.651693 -15.716561 -11.500001 +vn -0.0000 -0.0000 -1.0000 +vn -0.0000 -0.0000 1.0000 +vn -0.0000 1.0000 -0.0000 +vn -0.0000 -1.0000 -0.0000 +vn -1.0000 -0.0000 -0.0000 +vn 1.0000 -0.0000 -0.0000 +vt 0.921875 0.593750 +vt 0.921875 0.687500 +vt 0.953125 0.687500 +vt 0.953125 0.593750 +vt 0.937500 0.734375 +vt 0.937500 0.703125 +vt 0.921875 0.703125 +vt 0.921875 0.734375 +vt 0.921875 0.578125 +vt 0.937500 0.578125 +vt 0.937500 0.484375 +vt 0.921875 0.484375 +s 0 +usemtl JetWingpack +f 3/1/1 1/2/1 2/3/1 4/4/1 +f 6/2/2 5/3/2 7/4/2 8/1/2 +f 2/5/3 1/6/3 5/7/3 6/8/3 +f 7/8/4 3/5/4 4/6/4 8/7/4 +f 5/9/5 1/10/5 3/11/5 7/12/5 +f 4/12/6 2/9/6 6/10/6 8/11/6 +o cuboid.001 +v -2.651691 -8.716561 -15.500000 +v 0.348309 -8.716561 -15.500000 +v -2.651693 -16.716560 -15.500001 +v 0.348308 -16.716560 -15.500000 +v -2.651691 -8.716561 -12.500000 +v 0.348309 -8.716561 -12.500000 +v -2.651692 -16.716560 -12.500001 +v 0.348308 -16.716560 -12.500000 +vn -0.0000 -0.0000 -1.0000 +vn -0.0000 -0.0000 1.0000 +vn -0.0000 1.0000 -0.0000 +vn -0.0000 -1.0000 -0.0000 +vn -1.0000 -0.0000 -0.0000 +vn 1.0000 -0.0000 -0.0000 +vt 0.859375 0.203125 +vt 0.859375 0.328125 +vt 0.906250 0.328125 +vt 0.906250 0.203125 +vt 0.906250 0.375000 +vt 0.859375 0.375000 +vt 0.906250 0.187500 +vt 0.859375 0.187500 +vt 0.859375 0.140625 +vt 0.906250 0.140625 +s 0 +usemtl JetWingpack +f 11/13/7 9/14/7 10/15/7 12/16/7 +f 14/15/8 13/14/8 15/13/8 16/16/8 +f 10/17/9 9/15/9 13/14/9 14/18/9 +f 15/19/10 11/20/10 12/21/10 16/22/10 +f 13/15/11 9/14/11 11/13/11 15/16/11 +f 12/13/12 10/14/12 14/15/12 16/16/12 +o cuboid.002 +v -2.651692 -8.716561 -11.500000 +v 0.348308 -8.716561 -11.500000 +v -2.651693 -16.716560 -11.500001 +v 0.348307 -16.716560 -11.500000 +v -2.651692 -8.716561 -8.500000 +v 0.348308 -8.716561 -8.500000 +v -2.651693 -16.716560 -8.500001 +v 0.348307 -16.716560 -8.500000 +vn -0.0000 -0.0000 -1.0000 +vn -0.0000 -0.0000 1.0000 +vn -0.0000 1.0000 -0.0000 +vn -0.0000 -1.0000 -0.0000 +vn -1.0000 -0.0000 -0.0000 +vn 1.0000 -0.0000 -0.0000 +vt 0.859375 0.203125 +vt 0.859375 0.328125 +vt 0.906250 0.328125 +vt 0.906250 0.203125 +vt 0.906250 0.375000 +vt 0.859375 0.375000 +vt 0.906250 0.187500 +vt 0.859375 0.187500 +vt 0.859375 0.140625 +vt 0.906250 0.140625 +s 0 +usemtl JetWingpack +f 19/23/13 17/24/13 18/25/13 20/26/13 +f 22/25/14 21/24/14 23/23/14 24/26/14 +f 18/27/15 17/25/15 21/24/15 22/28/15 +f 23/29/16 19/30/16 20/31/16 24/32/16 +f 21/25/17 17/24/17 19/23/17 23/26/17 +f 20/23/18 18/24/18 22/25/18 24/26/18 +o cuboid.003 +v -4.651692 -12.716561 -20.999998 +v -4.151692 -11.716561 -21.000002 +v -3.651692 -12.716561 -20.999998 +v -4.151692 0.283438 -4.000000 +v -5.651693 -1.716562 -4.000000 +v -2.651692 -1.716562 -4.000000 +v -4.651692 -15.716561 -20.999998 +v -3.651692 -15.716561 -20.999998 +v -4.651693 -15.716561 -4.000000 +v -3.651693 -15.716561 -4.000000 +vn -0.0000 -0.0000 -1.0000 +vn 0.8463 0.4232 -0.3236 +vn -0.7367 0.5525 -0.3900 +vn -0.7366 0.5525 -0.3900 +vn -0.0000 -0.0000 1.0000 +vn -0.0000 -1.0000 -0.0000 +vn -0.9975 -0.0712 -0.0000 +vn 0.9974 -0.0713 -0.0126 +vn 0.9974 -0.0712 -0.0126 +vt 0.281250 0.703125 +vt 0.273438 0.718750 +vt 0.265625 0.703125 +vt 0.441125 0.059093 +vt 0.125000 0.079062 +vt 0.134010 0.093750 +vt 0.459145 0.093750 +vt 0.878625 0.855968 +vt 0.896645 0.890625 +vt 0.571510 0.890625 +vt 0.562500 0.875937 +vt 0.109375 0.406250 +vt 0.085938 0.437500 +vt 0.062500 0.406250 +vt 0.265625 0.656250 +vt 0.281250 0.656250 +vt 0.078125 0.187500 +vt 0.093750 0.187500 +vt 0.703125 0.750000 +vt 0.968750 0.750000 +vt 0.968750 0.765625 +vt 0.703125 0.765625 +vt 0.281250 0.546875 +vt 0.546875 0.546875 +vt 0.546875 0.765625 +vt 0.281250 0.593073 +vt 0.272710 0.500120 +vt 0.006909 0.672433 +vt 0.007106 0.453125 +vt 0.272710 0.453364 +s 0 +usemtl JetWingpack +f 25/33/19 26/34/19 27/35/19 +f 30/36/20 27/37/20 26/38/20 28/39/20 +f 29/40/21 28/41/21 26/42/22 25/43/21 +f 30/44/23 28/45/23 29/46/23 +f 25/33/19 27/35/19 32/47/19 31/48/19 +f 33/49/23 34/50/23 30/44/23 +f 29/46/23 33/49/23 30/44/23 +f 32/51/24 34/52/24 33/53/24 31/54/24 +f 31/55/25 33/56/25 29/57/25 25/58/25 +f 27/59/26 30/60/27 34/61/26 32/62/27 +o cuboid.004 +v -8.151692 -16.216560 -21.000000 +v -8.151692 -16.216560 -22.000000 +v -3.651690 -11.216561 -21.000002 +v -2.151692 -12.716561 -20.999998 +v -2.151692 -12.716561 -21.999998 +v -3.651692 -11.216561 -22.000002 +v -3.651692 -16.216560 -21.999998 +v -3.651692 -16.216560 -20.999998 +v -2.151692 -14.716561 -20.999998 +v -2.151692 -14.716561 -21.999998 +v -8.151692 -15.216560 -21.000000 +v -8.151692 -15.216560 -22.000000 +v -4.651692 -11.216561 -21.000002 +v -4.651692 -11.216561 -22.000002 +vn -0.0000 -1.0000 -0.0000 +vn -0.0000 -0.0000 1.0000 +vn -0.0000 -0.0000 -1.0000 +vn 1.0000 -0.0000 -0.0000 +vn -1.0000 -0.0000 -0.0000 +vn -0.0000 1.0000 -0.0000 +vn -0.7526 0.6585 -0.0000 +vn 0.7071 0.7071 -0.0000 +vn 0.7071 -0.7071 -0.0000 +vt 0.640625 0.078125 +vt 0.640625 0.156250 +vt 0.625000 0.156250 +vt 0.625000 0.078125 +vt 0.625000 0.578125 +vt 0.695312 0.578125 +vt 0.718750 0.601562 +vt 0.718750 0.632812 +vt 0.625000 0.539062 +vt 0.625000 0.507812 +vt 0.648438 0.484375 +vt 0.648438 0.562500 +vt 0.718750 0.484375 +vt 0.062500 0.921875 +vt 0.062500 0.890625 +vt 0.078125 0.890625 +vt 0.078125 0.921875 +vt 0.093750 0.921875 +vt 0.093750 0.906250 +vt 0.109375 0.906250 +vt 0.109375 0.921875 +vt 0.695312 0.656250 +vt 0.679688 0.656250 +vt 0.625000 0.593750 +vt 0.718750 0.500000 +vt 0.664062 0.562500 +vt 0.015625 0.843750 +vt 0.015625 0.859375 +vt 0.000000 0.859375 +vt 0.000000 0.843750 +vt 0.656250 0.156250 +vt 0.656250 0.078125 +vt 0.671875 0.078125 +vt 0.671875 0.156250 +vt 0.171875 0.968750 +vt 0.187500 0.968750 +vt 0.187500 1.000000 +vt 0.171875 1.000000 +vt 0.109375 0.687500 +vt 0.109375 0.718750 +vt 0.093750 0.718750 +vt 0.093750 0.687500 +s 0 +usemtl JetWingpack +f 42/63/28 35/64/28 36/65/28 41/66/28 +f 35/67/29 42/68/29 43/69/29 38/70/29 +f 39/71/30 44/72/30 41/73/30 40/74/30 +f 41/73/30 36/75/30 40/74/30 +f 38/76/31 43/77/31 44/78/31 39/79/31 +f 46/80/32 36/81/32 35/82/32 45/83/32 +f 38/70/29 37/84/29 47/85/29 45/86/29 +f 45/86/29 35/67/29 38/70/29 +f 36/75/30 46/87/30 48/88/30 40/74/30 +f 47/89/33 37/90/33 40/91/33 48/92/33 +f 48/93/34 46/94/34 45/95/34 47/96/34 +f 38/97/35 39/98/35 40/99/35 37/100/35 +f 41/101/36 44/102/36 43/103/36 42/104/36 +o cuboid.005 +v -2.651695 -8.716561 15.500000 +v 0.348305 -8.716561 15.500000 +v -2.651696 -16.716560 15.499999 +v 0.348304 -16.716560 15.500000 +v -2.651694 -8.716561 12.500000 +v 0.348306 -8.716561 12.500000 +v -2.651695 -16.716560 12.499999 +v 0.348305 -16.716560 12.500000 +vn -0.0000 -0.0000 1.0000 +vn -0.0000 -0.0000 -1.0000 +vn -0.0000 1.0000 -0.0000 +vn -0.0000 -1.0000 -0.0000 +vn -1.0000 -0.0000 -0.0000 +vn 1.0000 -0.0000 -0.0000 +vt 0.906250 0.328125 +vt 0.859375 0.328125 +vt 0.859375 0.203125 +vt 0.906250 0.203125 +vt 0.906250 0.375000 +vt 0.859375 0.375000 +vt 0.859375 0.140625 +vt 0.859375 0.187500 +vt 0.906250 0.187500 +vt 0.906250 0.140625 +s 0 +usemtl JetWingpack +f 50/105/37 49/106/37 51/107/37 52/108/37 +f 55/107/38 53/106/38 54/105/38 56/108/38 +f 53/106/39 49/105/39 50/109/39 54/110/39 +f 52/111/40 51/112/40 55/113/40 56/114/40 +f 51/107/41 49/106/41 53/105/41 55/108/41 +f 54/105/42 50/106/42 52/107/42 56/108/42 +o cuboid.006 +v -3.651694 -9.716561 12.500000 +v -1.651694 -9.716561 12.500000 +v -3.651695 -15.716561 12.499999 +v -1.651695 -15.716561 12.499999 +v -3.651694 -9.716561 11.500000 +v -1.651694 -9.716561 11.500000 +v -3.651695 -15.716561 11.499999 +v -1.651695 -15.716561 11.499999 +vn -0.0000 -0.0000 1.0000 +vn -0.0000 -0.0000 -1.0000 +vn -0.0000 1.0000 -0.0000 +vn -0.0000 -1.0000 -0.0000 +vn -1.0000 -0.0000 -0.0000 +vn 1.0000 -0.0000 -0.0000 +vt 0.953125 0.687500 +vt 0.921875 0.687500 +vt 0.921875 0.593750 +vt 0.953125 0.593750 +vt 0.921875 0.703125 +vt 0.937500 0.703125 +vt 0.937500 0.734375 +vt 0.921875 0.734375 +vt 0.937500 0.484375 +vt 0.937500 0.578125 +vt 0.921875 0.578125 +vt 0.921875 0.484375 +s 0 +usemtl JetWingpack +f 58/115/43 57/116/43 59/117/43 60/118/43 +f 63/118/44 61/115/44 62/116/44 64/117/44 +f 61/119/45 57/120/45 58/121/45 62/122/45 +f 60/120/46 59/121/46 63/122/46 64/119/46 +f 59/123/47 57/124/47 61/125/47 63/126/47 +f 62/124/48 58/125/48 60/126/48 64/123/48 +o cuboid.007 +v -2.651694 -8.716561 11.500000 +v 0.348306 -8.716561 11.500000 +v -2.651695 -16.716560 11.499999 +v 0.348305 -16.716560 11.500000 +v -2.651694 -8.716561 8.500000 +v 0.348306 -8.716561 8.500000 +v -2.651695 -16.716560 8.499999 +v 0.348305 -16.716560 8.500000 +vn -0.0000 -0.0000 1.0000 +vn -0.0000 -0.0000 -1.0000 +vn -0.0000 1.0000 -0.0000 +vn -0.0000 -1.0000 -0.0000 +vn -1.0000 -0.0000 -0.0000 +vn 1.0000 -0.0000 -0.0000 +vt 0.906250 0.328125 +vt 0.859375 0.328125 +vt 0.859375 0.203125 +vt 0.906250 0.203125 +vt 0.906250 0.375000 +vt 0.859375 0.375000 +vt 0.859375 0.140625 +vt 0.859375 0.187500 +vt 0.906250 0.187500 +vt 0.906250 0.140625 +s 0 +usemtl JetWingpack +f 66/127/49 65/128/49 67/129/49 68/130/49 +f 71/129/50 69/128/50 70/127/50 72/130/50 +f 69/128/51 65/127/51 66/131/51 70/132/51 +f 68/133/52 67/134/52 71/135/52 72/136/52 +f 67/129/53 65/128/53 69/127/53 71/130/53 +f 70/127/54 66/128/54 68/129/54 72/130/54 +o cuboid.008 +v -8.151695 -16.216560 21.000002 +v -8.151695 -16.216560 22.000002 +v -3.651695 -11.216561 20.999998 +v -2.151695 -12.716561 21.000002 +v -2.151695 -12.716561 22.000002 +v -3.651695 -11.216561 21.999998 +v -3.651697 -16.216560 22.000002 +v -3.651696 -16.216560 21.000002 +v -2.151696 -14.716561 21.000002 +v -2.151697 -14.716561 22.000002 +v -8.151695 -15.216560 21.000002 +v -8.151695 -15.216560 22.000002 +v -4.651695 -11.216561 20.999998 +v -4.651695 -11.216561 21.999998 +vn -0.0000 -1.0000 -0.0000 +vn -0.0000 -0.0000 -1.0000 +vn -0.0000 -0.0000 1.0000 +vn 1.0000 -0.0000 -0.0000 +vn -1.0000 -0.0000 -0.0000 +vn -0.0000 1.0000 -0.0000 +vn -0.7526 0.6585 -0.0000 +vn 0.7071 0.7071 -0.0000 +vn 0.7071 -0.7071 -0.0000 +vt 0.703125 0.156250 +vt 0.687500 0.156250 +vt 0.687500 0.078125 +vt 0.703125 0.078125 +vt 0.625000 0.414062 +vt 0.648438 0.390625 +vt 0.718750 0.390625 +vt 0.625000 0.445312 +vt 0.695312 0.296875 +vt 0.718750 0.320312 +vt 0.718750 0.351562 +vt 0.695312 0.375000 +vt 0.625000 0.296875 +vt 0.187500 0.609375 +vt 0.203125 0.609375 +vt 0.203125 0.640625 +vt 0.187500 0.640625 +vt 0.203125 0.984375 +vt 0.218750 0.984375 +vt 0.218750 1.000000 +vt 0.203125 1.000000 +vt 0.664062 0.468750 +vt 0.648438 0.468750 +vt 0.718750 0.406250 +vt 0.679688 0.375000 +vt 0.625000 0.312500 +vt 0.078125 0.718750 +vt 0.062500 0.718750 +vt 0.062500 0.703125 +vt 0.078125 0.703125 +vt 0.718750 0.078125 +vt 0.734375 0.078125 +vt 0.734375 0.156250 +vt 0.718750 0.156250 +vt 0.390625 1.000000 +vt 0.390625 0.968750 +vt 0.406250 0.968750 +vt 0.406250 1.000000 +vt 0.453125 0.765625 +vt 0.437500 0.765625 +vt 0.437500 0.734375 +vt 0.453125 0.734375 +s 0 +usemtl JetWingpack +f 74/137/55 73/138/55 80/139/55 79/140/55 +f 81/141/56 80/142/56 73/143/56 76/144/56 +f 79/145/57 82/146/57 77/147/57 78/148/57 +f 74/149/57 79/145/57 78/148/57 +f 82/150/58 81/151/58 76/152/58 77/153/58 +f 73/154/59 74/155/59 84/156/59 83/157/59 +f 85/158/56 75/159/56 76/144/56 83/160/56 +f 73/143/56 83/160/56 76/144/56 +f 86/161/57 84/162/57 74/149/57 78/148/57 +f 78/163/60 75/164/60 85/165/60 86/166/60 +f 83/167/61 84/168/61 86/169/61 85/170/61 +f 78/171/62 77/172/62 76/173/62 75/174/62 +f 81/175/63 82/176/63 79/177/63 80/178/63 +o cuboid.009 +v -6.151694 -11.716561 3.999999 +v -6.151693 0.283438 4.000000 +v -2.151694 -11.716561 4.000000 +v -2.151693 0.283438 4.000000 +v -6.151693 -11.716561 -4.000000 +v -6.151692 0.283438 -4.000000 +v -2.151693 -11.716561 -4.000000 +v -2.151692 0.283438 -4.000000 +vn -0.0000 -0.0000 1.0000 +vn -0.0000 -0.0000 -1.0000 +vn -1.0000 -0.0000 -0.0000 +vn 1.0000 -0.0000 -0.0000 +vn -0.0000 -1.0000 -0.0000 +vn -0.0000 1.0000 -0.0000 +vt 0.125000 0.437500 +vt 0.125000 0.250000 +vt 0.187500 0.250000 +vt 0.187500 0.437500 +vt 0.203125 0.250000 +vt 0.265625 0.250000 +vt 0.265625 0.437500 +vt 0.203125 0.437500 +vt 0.296875 0.343750 +vt 0.421875 0.343750 +vt 0.421875 0.531250 +vt 0.296875 0.531250 +vt 0.437500 0.531250 +vt 0.437500 0.343750 +vt 0.562500 0.343750 +vt 0.562500 0.531250 +vt 0.125000 0.937500 +vt 0.125000 1.000000 +vt 0.000000 1.000000 +vt 0.000000 0.937500 +vt 0.125000 0.656250 +vt 0.250000 0.656250 +vt 0.250000 0.718750 +vt 0.125000 0.718750 +s 0 +usemtl JetWingpack +f 88/179/64 87/180/64 89/181/64 90/182/64 +f 93/183/65 91/184/65 92/185/65 94/186/65 +f 91/187/66 87/188/66 88/189/66 92/190/66 +f 90/191/67 89/192/67 93/193/67 94/194/67 +f 89/195/68 87/196/68 91/197/68 93/198/68 +f 92/199/69 88/200/69 90/201/69 94/202/69 +o cuboid.010 +v -2.260000 -6.000000 4.260000 +v -2.260000 0.260000 4.260000 +v 2.260000 -6.000000 4.260001 +v 2.259999 0.260000 4.260000 +v -2.260000 -6.000000 -4.260000 +v -2.260000 0.260000 -4.260000 +v 2.260000 -6.000000 -4.260000 +v 2.260001 0.260000 -4.260000 +vn -0.0000 -0.0000 1.0000 +vn -0.0000 -0.0000 -1.0000 +vn -1.0000 -0.0000 -0.0000 +vn 1.0000 -0.0000 -0.0000 +vn -0.0000 -1.0000 -0.0000 +vn -0.0000 1.0000 -0.0000 +vt 0.296875 0.765625 +vt 0.296875 0.671875 +vt 0.359375 0.671875 +vt 0.359375 0.765625 +vt 0.281250 0.234375 +vt 0.343750 0.234375 +vt 0.343750 0.328125 +vt 0.281250 0.328125 +vt 0.484375 0.906250 +vt 0.609375 0.906250 +vt 0.609375 1.000000 +vt 0.484375 1.000000 +vt 0.562500 0.765625 +vt 0.562500 0.671875 +vt 0.687500 0.671875 +vt 0.687500 0.765625 +vt 0.703125 0.781250 +vt 0.703125 0.843750 +vt 0.578125 0.843750 +vt 0.578125 0.781250 +vt 0.625000 0.937500 +vt 0.750000 0.937500 +vt 0.750000 1.000000 +vt 0.625000 1.000000 +s 0 +usemtl JetWingpack +f 96/203/70 95/204/70 97/205/70 98/206/70 +f 101/207/71 99/208/71 100/209/71 102/210/71 +f 99/211/72 95/212/72 96/213/72 100/214/72 +f 98/215/73 97/216/73 101/217/73 102/218/73 +f 97/219/74 95/220/74 99/221/74 101/222/74 +f 100/223/75 96/224/75 98/225/75 102/226/75 +o cuboid.011 +v -3.596138 -16.716560 -3.333334 +v -4.707249 -16.716560 -3.333334 +v -3.151693 -11.716561 -4.000000 +v -5.151693 -11.716561 -4.000000 +v -4.707249 -16.716560 -0.666667 +v -3.596138 -16.716560 -0.666667 +v -5.151693 -11.716561 -0.000001 +v -3.151693 -11.716561 -0.000000 +v -5.485027 -16.716560 -2.555556 +v -5.485027 -16.716560 -1.444445 +v -6.151693 -11.716561 -3.000001 +v -6.151693 -11.716561 -1.000001 +v -2.818360 -16.716560 -1.444445 +v -2.818360 -16.716560 -2.555556 +v -2.151693 -11.716561 -1.000000 +v -2.151693 -11.716561 -3.000000 +vn -0.0000 -0.1322 -0.9912 +vn -0.0000 -0.1322 0.9912 +vn -0.9912 -0.1322 -0.0000 +vn 0.9912 -0.1322 -0.0000 +vn -0.6985 -0.1552 0.6985 +vn -0.6985 -0.1552 -0.6985 +vn 0.6985 -0.1552 -0.6985 +vn 0.6985 -0.1552 0.6985 +vn -0.0000 -1.0000 -0.0000 +vt 0.748225 0.406250 +vt 0.734375 0.312688 +vt 0.765625 0.310394 +vt 0.765625 0.404975 +vt 0.748225 0.281250 +vt 0.734375 0.187688 +vt 0.765625 0.185394 +vt 0.765625 0.279975 +vt 0.607600 0.281250 +vt 0.593750 0.187688 +vt 0.625000 0.185394 +vt 0.625000 0.279975 +vt 0.748225 0.531250 +vt 0.734375 0.437688 +vt 0.765625 0.435394 +vt 0.765625 0.529975 +vt 0.800892 0.515625 +vt 0.783706 0.515625 +vt 0.781250 0.421875 +vt 0.803347 0.421875 +vt 0.321653 0.125000 +vt 0.343750 0.125000 +vt 0.341294 0.218750 +vt 0.324108 0.218750 +vt 0.781250 0.531250 +vt 0.803347 0.531250 +vt 0.800891 0.625000 +vt 0.783705 0.625000 +vt 0.810045 0.734375 +vt 0.792859 0.734375 +vt 0.790403 0.640625 +vt 0.812500 0.640625 +vt 0.014756 0.921875 +vt 0.002605 0.909723 +vt 0.002605 0.892361 +vt 0.014756 0.880209 +vt 0.032119 0.880209 +vt 0.044270 0.892361 +vt 0.044270 0.909723 +vt 0.032119 0.921875 +vt 0.375000 0.328125 +vt 0.359375 0.312500 +vt 0.359375 0.281250 +vt 0.375000 0.265625 +vt 0.406250 0.265625 +vt 0.421875 0.281250 +vt 0.421875 0.312500 +vt 0.406250 0.328125 +s 0 +usemtl JetWingpack +f 104/227/76 106/228/76 105/229/76 103/230/76 +f 108/231/77 110/232/77 109/233/77 107/234/77 +f 112/235/78 114/236/78 113/237/78 111/238/78 +f 116/239/79 118/240/79 117/241/79 115/242/79 +f 112/243/80 107/244/80 109/245/80 114/246/80 +f 113/247/81 106/248/81 104/249/81 111/250/81 +f 105/251/82 118/252/82 116/253/82 103/254/82 +f 108/255/83 115/256/83 117/257/83 110/258/83 +f 115/259/84 108/260/84 107/261/84 112/262/84 +f 112/262/84 111/263/84 104/264/84 103/265/84 +f 103/265/84 116/266/84 115/259/84 112/262/84 +f 117/267/84 110/268/84 109/269/84 114/270/84 +f 114/270/84 113/271/84 106/272/84 105/273/84 +f 105/273/84 118/274/84 117/267/84 114/270/84 +o cuboid.012 +v -3.596138 -16.716560 0.666666 +v -4.707249 -16.716560 0.666666 +v -3.151693 -11.716561 -0.000000 +v -5.151693 -11.716561 -0.000001 +v -4.707249 -16.716560 3.333333 +v -3.596138 -16.716560 3.333333 +v -5.151694 -11.716561 3.999999 +v -3.151694 -11.716561 4.000000 +v -5.485027 -16.716560 1.444444 +v -5.485027 -16.716560 2.555555 +v -6.151693 -11.716561 0.999999 +v -6.151694 -11.716561 2.999999 +v -2.818361 -16.716560 2.555555 +v -2.818361 -16.716560 1.444444 +v -2.151694 -11.716561 3.000000 +v -2.151694 -11.716561 1.000000 +vn -0.0000 -0.1322 -0.9912 +vn -0.0000 -0.1322 0.9912 +vn -0.9912 -0.1322 -0.0000 +vn 0.9912 -0.1322 -0.0000 +vn -0.6985 -0.1552 0.6985 +vn -0.6985 -0.1552 -0.6985 +vn 0.6985 -0.1552 -0.6985 +vn 0.6985 -0.1552 0.6985 +vn -0.0000 -1.0000 -0.0000 +vt 0.420100 0.250000 +vt 0.406250 0.156438 +vt 0.437500 0.154144 +vt 0.437500 0.248725 +vt 0.466975 0.250000 +vt 0.453125 0.156438 +vt 0.484375 0.154144 +vt 0.484375 0.248725 +vt 0.654475 0.281250 +vt 0.640625 0.187688 +vt 0.671875 0.185394 +vt 0.671875 0.279975 +vt 0.373225 0.250000 +vt 0.359375 0.156438 +vt 0.390625 0.154144 +vt 0.390625 0.248725 +vt 0.019642 0.171875 +vt 0.002456 0.171875 +vt 0.000000 0.078125 +vt 0.022097 0.078125 +vt 0.790403 0.203125 +vt 0.812500 0.203125 +vt 0.810044 0.296875 +vt 0.792858 0.296875 +vt 0.781250 0.093750 +vt 0.803347 0.093750 +vt 0.800891 0.187500 +vt 0.783705 0.187500 +vt 0.810045 0.406250 +vt 0.792859 0.406250 +vt 0.790403 0.312500 +vt 0.812500 0.312500 +vt 0.233506 0.640625 +vt 0.221355 0.628473 +vt 0.221355 0.611111 +vt 0.233506 0.598959 +vt 0.250869 0.598959 +vt 0.263020 0.611111 +vt 0.263020 0.628473 +vt 0.250869 0.640625 +vt 0.453125 0.328125 +vt 0.437500 0.312500 +vt 0.437500 0.281250 +vt 0.453125 0.265625 +vt 0.484375 0.265625 +vt 0.500000 0.281250 +vt 0.500000 0.312500 +vt 0.484375 0.328125 +s 0 +usemtl JetWingpack +f 120/275/85 122/276/85 121/277/85 119/278/85 +f 124/279/86 126/280/86 125/281/86 123/282/86 +f 128/283/87 130/284/87 129/285/87 127/286/87 +f 132/287/88 134/288/88 133/289/88 131/290/88 +f 128/291/89 123/292/89 125/293/89 130/294/89 +f 129/295/90 122/296/90 120/297/90 127/298/90 +f 121/299/91 134/300/91 132/301/91 119/302/91 +f 124/303/92 131/304/92 133/305/92 126/306/92 +f 131/307/93 124/308/93 123/309/93 128/310/93 +f 128/310/93 127/311/93 120/312/93 119/313/93 +f 119/313/93 132/314/93 131/307/93 128/310/93 +f 133/315/93 126/316/93 125/317/93 130/318/93 +f 130/318/93 129/319/93 122/320/93 121/321/93 +f 121/321/93 134/322/93 133/315/93 130/318/93 +o cuboid.013 +v -4.651695 -12.716561 21.000002 +v -4.151695 -11.716561 20.999998 +v -3.651695 -12.716561 21.000002 +v -4.151693 0.283438 3.999999 +v -5.651693 -1.716562 4.000000 +v -2.651693 -1.716562 4.000000 +v -4.651697 -15.716561 21.000002 +v -3.651696 -15.716561 21.000002 +v -4.651694 -15.716561 3.999999 +v -3.651694 -15.716561 4.000000 +vn -0.0000 -0.0000 1.0000 +vn 0.8463 0.4232 0.3236 +vn -0.7366 0.5525 0.3900 +vn -0.7367 0.5525 0.3900 +vn -0.0000 -0.0000 -1.0000 +vn -0.0000 -1.0000 -0.0000 +vn -0.9975 -0.0712 -0.0000 +vn 0.9974 -0.0713 0.0126 +vn 0.9974 -0.0712 0.0126 +vt 0.148438 1.000000 +vt 0.140625 0.984375 +vt 0.156250 0.984375 +vt 0.609375 0.331116 +vt 0.598094 0.322105 +vt 0.578125 0.638230 +vt 0.609375 0.656250 +vt 0.023438 0.437500 +vt 0.000000 0.406250 +vt 0.046875 0.406250 +vt 0.156250 0.937500 +vt 0.140625 0.937500 +vt 0.015625 0.187500 +vt 0.031250 0.187500 +vt 0.625000 0.921875 +vt 0.625000 0.906250 +vt 0.890625 0.906250 +vt 0.890625 0.921875 +vt 0.296875 1.000000 +vt 0.296875 0.781250 +vt 0.562500 0.781250 +vt 0.562500 0.827448 +vt 0.274144 0.734375 +vt 0.274341 0.953683 +vt 0.008540 0.781370 +vt 0.008540 0.734614 +s 0 +usemtl JetWingpack +f 136/323/94 135/324/94 137/325/94 +f 136/326/95 137/327/95 140/328/95 138/329/95 +f 136/326/96 138/329/97 139/328/97 135/327/97 +f 138/330/98 140/331/98 139/332/98 +f 142/333/94 137/325/94 135/324/94 141/334/94 +f 144/335/98 143/336/98 140/331/98 +f 143/336/98 139/332/98 140/331/98 +f 143/337/99 144/338/99 142/339/99 141/340/99 +f 139/341/100 143/342/100 141/343/100 135/344/100 +f 144/345/101 140/346/102 137/347/101 142/348/102 diff --git a/src/main/resources/assets/susy/sounds.json b/src/main/resources/assets/susy/sounds.json index b5ece9d47..b0c26f263 100644 --- a/src/main/resources/assets/susy/sounds.json +++ b/src/main/resources/assets/susy/sounds.json @@ -16,5 +16,14 @@ "stream": true } ] + }, + "item.jet_wingpack_engine_active" : { + "category" : "player", + "sounds" : [ + { + "name" : "susy:jet_engine_active", + "stream" : true + } + ] } } diff --git a/src/main/resources/assets/susy/sounds/jet_engine_active.ogg b/src/main/resources/assets/susy/sounds/jet_engine_active.ogg new file mode 100644 index 000000000..18c483525 Binary files /dev/null and b/src/main/resources/assets/susy/sounds/jet_engine_active.ogg differ diff --git a/src/main/resources/assets/susy/textures/armor/jet_wingpack.png b/src/main/resources/assets/susy/textures/armor/jet_wingpack.png new file mode 100644 index 000000000..7ca06410b Binary files /dev/null and b/src/main/resources/assets/susy/textures/armor/jet_wingpack.png differ diff --git a/src/main/resources/mixins.susy.early.json b/src/main/resources/mixins.susy.early.json new file mode 100644 index 000000000..1f23901f7 --- /dev/null +++ b/src/main/resources/mixins.susy.early.json @@ -0,0 +1,10 @@ +{ + "package" : "supersymmetry.mixins.minecraft", + "refmap" : "mixins.susy.refmap.json", + "target" : "@env(DEFAULT)", + "minVersion" : "0.8", + "compatibilityLevel" : "JAVA_8", + "mixins" : [ + "EntityPlayerMixin" + ] +}