mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-30 02:38:34 +01:00
Compare commits
No commits in common. "e2fb8b12a9a98c384feefe8069df9b735e3b2ca6" and "860215e7c11ceb4a7c8145612b5e8596b374ac49" have entirely different histories.
e2fb8b12a9
...
860215e7c1
17 changed files with 78 additions and 62 deletions
|
@ -7,10 +7,10 @@ mod_version=1.1.52
|
||||||
|
|
||||||
# Forge
|
# Forge
|
||||||
game_version=1.16.5
|
game_version=1.16.5
|
||||||
forge_version=36.2.34
|
forge_version=36.2.30
|
||||||
|
|
||||||
# Parchment (Mappings)
|
# Parchment (Mappings)
|
||||||
parchment_version=2021.10.17
|
parchment_version=2021.10.17
|
||||||
|
|
||||||
# Other mods
|
# Other mods
|
||||||
jei_version=1.16.5:7.7.1.153
|
jei_version=1.16.5:7.7.1.117
|
||||||
|
|
|
@ -83,8 +83,8 @@ public class ActuallyAdditions {
|
||||||
};
|
};
|
||||||
public static final Logger LOGGER = LogManager.getLogger(NAME);
|
public static final Logger LOGGER = LogManager.getLogger(NAME);
|
||||||
|
|
||||||
public static final DeferredRegister<EntityType<?>> ENTITIES = DeferredRegister.create(ForgeRegistries.ENTITIES, MODID);
|
public static final DeferredRegister<EntityType<?>> ENTITIES = DeferredRegister.create(ForgeRegistries.ENTITIES, "entities");
|
||||||
public static final RegistryObject<EntityType<EntityWorm>> ENTITY_WORM = ENTITIES.register("worm", () -> EntityType.Builder.of(EntityWorm::new, EntityClassification.MISC).build(MODID + ":worm"));
|
public static final RegistryObject<EntityType<EntityWorm>> ENTITY_WORM = ENTITIES.register("worm", () -> EntityType.Builder.of(EntityWorm::new, EntityClassification.CREATURE).build(MODID + ":worm"));
|
||||||
|
|
||||||
public static boolean commonCapsLoaded;
|
public static boolean commonCapsLoaded;
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod;
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.render.*;
|
import de.ellpeck.actuallyadditions.mod.blocks.render.*;
|
||||||
import de.ellpeck.actuallyadditions.mod.entity.EntityWorm;
|
|
||||||
import de.ellpeck.actuallyadditions.mod.entity.InitEntities;
|
import de.ellpeck.actuallyadditions.mod.entity.InitEntities;
|
||||||
import de.ellpeck.actuallyadditions.mod.entity.RenderWorm;
|
import de.ellpeck.actuallyadditions.mod.entity.RenderWorm;
|
||||||
import de.ellpeck.actuallyadditions.mod.event.ClientEvents;
|
import de.ellpeck.actuallyadditions.mod.event.ClientEvents;
|
||||||
|
@ -30,7 +29,6 @@ import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.BlockRayTraceResult;
|
import net.minecraft.util.math.BlockRayTraceResult;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.fml.client.registry.ClientRegistry;
|
import net.minecraftforge.fml.client.registry.ClientRegistry;
|
||||||
import net.minecraftforge.fml.client.registry.RenderingRegistry;
|
|
||||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||||
|
|
||||||
public class ActuallyAdditionsClient {
|
public class ActuallyAdditionsClient {
|
||||||
|
@ -62,6 +60,7 @@ public class ActuallyAdditionsClient {
|
||||||
ScreenManager.register(ActuallyContainers.RANGED_COLLECTOR_CONTAINER.get(), GuiRangedCollector::new);
|
ScreenManager.register(ActuallyContainers.RANGED_COLLECTOR_CONTAINER.get(), GuiRangedCollector::new);
|
||||||
ScreenManager.register(ActuallyContainers.XPSOLIDIFIER_CONTAINER.get(), GuiXPSolidifier::new);
|
ScreenManager.register(ActuallyContainers.XPSOLIDIFIER_CONTAINER.get(), GuiXPSolidifier::new);
|
||||||
// From old proxy
|
// From old proxy
|
||||||
|
InitEntities.initClient();
|
||||||
MinecraftForge.EVENT_BUS.register(new ClientEvents());
|
MinecraftForge.EVENT_BUS.register(new ClientEvents());
|
||||||
MinecraftForge.EVENT_BUS.register(new ClientRegistryHandler());
|
MinecraftForge.EVENT_BUS.register(new ClientRegistryHandler());
|
||||||
MinecraftForge.EVENT_BUS.register(new SpecialRenderInit());
|
MinecraftForge.EVENT_BUS.register(new SpecialRenderInit());
|
||||||
|
@ -100,8 +99,6 @@ public class ActuallyAdditionsClient {
|
||||||
ClientRegistry.bindTileEntityRenderer(ActuallyBlocks.LASER_RELAY_ITEM.getTileEntityType(), RenderLaserRelay::new);
|
ClientRegistry.bindTileEntityRenderer(ActuallyBlocks.LASER_RELAY_ITEM.getTileEntityType(), RenderLaserRelay::new);
|
||||||
ClientRegistry.bindTileEntityRenderer(ActuallyBlocks.LASER_RELAY_ITEM_ADVANCED.getTileEntityType(), RenderLaserRelay::new);
|
ClientRegistry.bindTileEntityRenderer(ActuallyBlocks.LASER_RELAY_ITEM_ADVANCED.getTileEntityType(), RenderLaserRelay::new);
|
||||||
ClientRegistry.bindTileEntityRenderer(ActuallyBlocks.LASER_RELAY_FLUIDS.getTileEntityType(), RenderLaserRelay::new);
|
ClientRegistry.bindTileEntityRenderer(ActuallyBlocks.LASER_RELAY_FLUIDS.getTileEntityType(), RenderLaserRelay::new);
|
||||||
|
|
||||||
RenderingRegistry.registerEntityRenderingHandler(ActuallyAdditions.ENTITY_WORM.get(), RenderWorm::new);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: [port] validate that this works
|
// TODO: [port] validate that this works
|
||||||
|
|
|
@ -68,6 +68,7 @@ public class BlockColoredLamp extends BlockBase {
|
||||||
builder.add(LIT);
|
builder.add(LIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: [port][test] validate this rework works
|
||||||
@Override
|
@Override
|
||||||
public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||||
ItemStack stack = player.getItemInHand(hand);
|
ItemStack stack = player.getItemInHand(hand);
|
||||||
|
@ -100,4 +101,33 @@ public class BlockColoredLamp extends BlockBase {
|
||||||
? 15
|
? 15
|
||||||
: 0;
|
: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: [port] Add this back correctly
|
||||||
|
// public static class TheItemBlock extends ItemBlockBase {
|
||||||
|
//
|
||||||
|
// public TheItemBlock(Block block) {
|
||||||
|
// super(block);
|
||||||
|
// this.setHasSubtypes(true);
|
||||||
|
// this.setMaxDamage(0);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public String getItemStackDisplayName(ItemStack stack) {
|
||||||
|
// if (stack.getItemDamage() >= ALL_LAMP_TYPES.length) {
|
||||||
|
// return StringUtil.BUGGED_ITEM_NAME;
|
||||||
|
// }
|
||||||
|
// if (Util.isClient()) {
|
||||||
|
// return super.getItemStackDisplayName(stack) + (((BlockColoredLamp) this.block).isOn
|
||||||
|
// ? " (" + StringUtil.localize("tooltip." + ActuallyAdditions.MODID + ".onSuffix.desc") + ")"
|
||||||
|
// : "");
|
||||||
|
// } else {
|
||||||
|
// return super.getItemStackDisplayName(stack);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public String getTranslationKey(ItemStack stack) {
|
||||||
|
// return ActuallyBlocks.blockColoredLamp.getTranslationKey() + "_" + ALL_LAMP_TYPES[stack.getItemDamage()].regName;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,4 +29,25 @@ public class BlockCrystal extends ActuallyBlock {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// public static class TheItemBlock extends ItemBlockBase {
|
||||||
|
//
|
||||||
|
// public TheItemBlock(Block block) {
|
||||||
|
// super(block);
|
||||||
|
// this.setHasSubtypes(true);
|
||||||
|
// this.setMaxDamage(0);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public String getTranslationKey(ItemStack stack) {
|
||||||
|
// return stack.getItemDamage() >= ALL_CRYSTALS.length
|
||||||
|
// ? StringUtil.BUGGED_ITEM_NAME
|
||||||
|
// : this.getTranslationKey() + "_" + ALL_CRYSTALS[stack.getItemDamage()].name;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public boolean hasEffect(ItemStack stack) {
|
||||||
|
// return this.block instanceof BlockCrystal && ((BlockCrystal) this.block).isEmpowered;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,11 +42,6 @@ public class ColorChangeRecipe implements IRecipe<IInventory> {
|
||||||
return input.test(stack);
|
return input.test(stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isSpecial() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Nonnull
|
@Nonnull
|
||||||
@Override
|
@Override
|
||||||
public ItemStack assemble(@Nonnull IInventory pInv) {
|
public ItemStack assemble(@Nonnull IInventory pInv) {
|
||||||
|
|
|
@ -56,11 +56,6 @@ public class CrushingRecipe implements IRecipe<IInventory> {
|
||||||
return input.test(stack);
|
return input.test(stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isSpecial() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Nonnull
|
@Nonnull
|
||||||
public ItemStack assemble(@Nonnull IInventory pInv) {
|
public ItemStack assemble(@Nonnull IInventory pInv) {
|
||||||
|
|
|
@ -79,11 +79,6 @@ public class EmpowererRecipe implements IRecipe<IInventory> {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isSpecial() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Nonnull
|
@Nonnull
|
||||||
public ItemStack assemble(@Nonnull IInventory pInv) {
|
public ItemStack assemble(@Nonnull IInventory pInv) {
|
||||||
|
|
|
@ -80,11 +80,6 @@ public class FermentingRecipe implements IRecipe<IInventory> {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isSpecial() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Nonnull
|
@Nonnull
|
||||||
@Override
|
@Override
|
||||||
public ItemStack assemble(IInventory pInv) {
|
public ItemStack assemble(IInventory pInv) {
|
||||||
|
|
|
@ -57,11 +57,6 @@ public class LaserRecipe implements IRecipe<IInventory> {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isSpecial() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack assemble(IInventory pInv) {
|
public ItemStack assemble(IInventory pInv) {
|
||||||
return result.copy();
|
return result.copy();
|
||||||
|
|
|
@ -59,11 +59,6 @@ public class LiquidFuelRecipe implements IRecipe<IInventory> {
|
||||||
return this.fuel.isFluidEqual(stack);
|
return this.fuel.isFluidEqual(stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isSpecial() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getFuelAmount() {
|
public int getFuelAmount() {
|
||||||
return this.fuel.getAmount();
|
return this.fuel.getAmount();
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,11 +52,6 @@ public class MiningLensRecipe extends WeightedRandom.Item implements IRecipe<IIn
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isSpecial() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Nonnull
|
@Nonnull
|
||||||
@Override
|
@Override
|
||||||
public ItemStack assemble(IInventory pInv) {
|
public ItemStack assemble(IInventory pInv) {
|
||||||
|
|
|
@ -38,11 +38,6 @@ public class PressingRecipe implements IRecipe<IInventory> {
|
||||||
return input.test(pInv.getItem(0));
|
return input.test(pInv.getItem(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isSpecial() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack assemble(IInventory pInv) {
|
public ItemStack assemble(IInventory pInv) {
|
||||||
return ItemStack.EMPTY;
|
return ItemStack.EMPTY;
|
||||||
|
|
|
@ -45,11 +45,6 @@ public class SolidFuelRecipe implements IRecipe<SingleItem> {
|
||||||
return this.itemIngredient.test(stack);
|
return this.itemIngredient.test(stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isSpecial() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack assemble(SingleItem pInv) {
|
public ItemStack assemble(SingleItem pInv) {
|
||||||
return ItemStack.EMPTY;
|
return ItemStack.EMPTY;
|
||||||
|
|
|
@ -17,13 +17,11 @@ import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityType;
|
import net.minecraft.entity.EntityType;
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
import net.minecraft.network.IPacket;
|
import net.minecraft.network.IPacket;
|
||||||
import net.minecraft.network.play.server.SSpawnObjectPacket;
|
|
||||||
import net.minecraft.util.math.AxisAlignedBB;
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.server.ServerWorld;
|
import net.minecraft.world.server.ServerWorld;
|
||||||
import net.minecraftforge.common.IPlantable;
|
import net.minecraftforge.common.IPlantable;
|
||||||
import net.minecraftforge.fml.network.NetworkHooks;
|
|
||||||
|
|
||||||
public class EntityWorm extends Entity {
|
public class EntityWorm extends Entity {
|
||||||
|
|
||||||
|
@ -130,6 +128,6 @@ public class EntityWorm extends Entity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPacket<?> getAddEntityPacket() {
|
public IPacket<?> getAddEntityPacket() {
|
||||||
return NetworkHooks.getEntitySpawningPacket(this);
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,6 @@ import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.Util;
|
import net.minecraft.util.Util;
|
||||||
import net.minecraft.util.math.vector.Quaternion;
|
import net.minecraft.util.math.vector.Quaternion;
|
||||||
import net.minecraft.util.math.vector.Vector3f;
|
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
|
|
||||||
|
@ -47,8 +46,9 @@ public class RenderWorm extends EntityRenderer<EntityWorm> {
|
||||||
|
|
||||||
matrix.translate(0, 0.7F, 0);
|
matrix.translate(0, 0.7F, 0);
|
||||||
double boop = Util.getMillis() / 70D;
|
double boop = Util.getMillis() / 70D;
|
||||||
matrix.mulPose(Vector3f.YP.rotationDegrees(-(float) (boop % 360)));
|
matrix.mulPose(new Quaternion(-(float) (boop % 360), 0, 1, 0));
|
||||||
matrix.translate(0,0,0.4);
|
|
||||||
|
// stack.getDisplayName()
|
||||||
Minecraft.getInstance().getItemRenderer().renderStatic(
|
Minecraft.getInstance().getItemRenderer().renderStatic(
|
||||||
stack, ItemCameraTransforms.TransformType.FIXED, light, OverlayTexture.NO_OVERLAY, matrix, buffer
|
stack, ItemCameraTransforms.TransformType.FIXED, light, OverlayTexture.NO_OVERLAY, matrix, buffer
|
||||||
);
|
);
|
||||||
|
@ -56,6 +56,21 @@ public class RenderWorm extends EntityRenderer<EntityWorm> {
|
||||||
matrix.popPose();
|
matrix.popPose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void doRender(EntityWorm entity, double x, double y, double z, float entityYaw, float partialTicks) {
|
||||||
|
// GlStateManager.pushMatrix();
|
||||||
|
// this.bindEntityTexture(entity);
|
||||||
|
// GlStateManager.translate(x, y + 0.7F, z);
|
||||||
|
// double boop = Minecraft.getSystemTime() / 70D;
|
||||||
|
// GlStateManager.rotate(-(float) (boop % 360), 0, 1, 0);
|
||||||
|
// GlStateManager.translate(0, 0, 0.4);
|
||||||
|
//
|
||||||
|
// stack.setStackDisplayName(entity.getName());
|
||||||
|
// AssetUtil.renderItemInWorld(stack, combinedLightIn, combinedOverlayIn, matrices, buffer);
|
||||||
|
//
|
||||||
|
// GlStateManager.popMatrix();
|
||||||
|
// }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResourceLocation getTextureLocation(EntityWorm pEntity) {
|
public ResourceLocation getTextureLocation(EntityWorm pEntity) {
|
||||||
return PlayerContainer.BLOCK_ATLAS;
|
return PlayerContainer.BLOCK_ATLAS;
|
||||||
|
|
Loading…
Reference in a new issue