Forge updated to 1.19-41.1.0.

This commit is contained in:
stfwi 2022-07-29 09:18:30 +02:00
parent 96d675198f
commit 6234e23343
101 changed files with 265 additions and 274 deletions

3
.gitattributes vendored
View file

@ -1,5 +1,2 @@
# Disable autocrlf on generated files, they always generate with LF
# Add any extra files or paths here to make git stop saying they
# are changed when only line endings change.
src/generated/**/.cache/cache text eol=lf src/generated/**/.cache/cache text eol=lf
src/generated/**/*.json text eol=lf src/generated/**/*.json text eol=lf

View file

@ -36,8 +36,8 @@ minecraft {
dependencies { dependencies {
minecraft "net.minecraftforge:forge:${version_forge_minecraft}" minecraft "net.minecraftforge:forge:${version_forge_minecraft}"
//compileOnly fg.deobf("mezz.jei:jei-${version_jei}:api") //compileOnly fg.deobf("mezz.jei:jei-${version_minecraft}-forge-api:${version_jei}")
//runtimeOnly fg.deobf("mezz.jei:jei-${version_jei}") //runtimeOnly fg.deobf("mezz.jei:jei-${version_minecraft}-forge:${version_jei}")
} }
processResources { processResources {

View file

@ -5,6 +5,6 @@ meta_modid=engineersdecor
meta_issues=https://github.com/stfwi/engineers-decor/issues meta_issues=https://github.com/stfwi/engineers-decor/issues
meta_download=https://www.curseforge.com/minecraft/mc-mods/engineers-decor/ meta_download=https://www.curseforge.com/minecraft/mc-mods/engineers-decor/
version_minecraft=1.19 version_minecraft=1.19
version_forge_minecraft=1.19-41.0.35 version_forge_minecraft=1.19-41.1.0
version_jei=1.19:11.0.0.206 version_jei=11.0.0.206
version_engineersdecor=1.1.24-b1 version_engineersdecor=1.1.24

View file

@ -1,6 +1,7 @@
{ {
"homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/", "homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/",
"1.19": { "1.19": {
"1.1.24": "[U] Forge updated to 1.19-41.1.0.\n[B] Known issue: JEI integration missing.",
"1.1.24-b1": "[U] Initial 1.19 port.\n[D] Metal/Treated Wood Crafting Table dropped in favour of IE Engineer's Crafting Table.\n[D] Labeled Crate dropped.\n[D] Obsolete wood blocks dropped.", "1.1.24-b1": "[U] Initial 1.19 port.\n[D] Metal/Treated Wood Crafting Table dropped in favour of IE Engineer's Crafting Table.\n[D] Labeled Crate dropped.\n[D] Obsolete wood blocks dropped.",
"1.1.23": "[R] Release build.\n[F] Updated Forge and re-enabled JSON tags (issue #217, ty snarkbait66).", "1.1.23": "[R] Release build.\n[F] Updated Forge and re-enabled JSON tags (issue #217, ty snarkbait66).",
"1.1.23-b1": "[A] Added ability to install inset lights in top-aligned catwalks (PR#215, Sergii).\n[A] Iron Hatch improved (PR#216, Sergii).", "1.1.23-b1": "[A] Added ability to install inset lights in top-aligned catwalks (PR#215, Sergii).\n[A] Iron Hatch improved (PR#216, Sergii).",
@ -58,7 +59,7 @@
"1.1.2-b1": "[U] Ported to MC1.16.2." "1.1.2-b1": "[U] Ported to MC1.16.2."
}, },
"promos": { "promos": {
"1.19-recommended": "1.1.23", "1.19-recommended": "1.1.24",
"1.19-latest": "1.1.24-b1" "1.19-latest": "1.1.24"
} }
} }

View file

@ -11,6 +11,9 @@ Mod sources for Minecraft version 1.18.x.
## Version history ## Version history
- v1.1.24 [U] Forge updated to 1.19-41.1.0.
[B] Known issue: JEI integration missing.
- v1.1.24-b1 [U] Initial 1.19 port. - v1.1.24-b1 [U] Initial 1.19 port.
[D] Metal/Treated Wood Crafting Table dropped in favour of IE Engineer's Crafting Table. [D] Metal/Treated Wood Crafting Table dropped in favour of IE Engineer's Crafting Table.
[D] Labeled Crate dropped. [D] Labeled Crate dropped.

View file

@ -15,10 +15,10 @@ import net.minecraft.world.level.block.Block;
import net.minecraftforge.common.ForgeConfigSpec; import net.minecraftforge.common.ForgeConfigSpec;
import org.apache.commons.lang3.tuple.Pair; import org.apache.commons.lang3.tuple.Pair;
import wile.engineersdecor.blocks.*; import wile.engineersdecor.blocks.*;
import wile.engineersdecor.libmc.blocks.SlabSliceBlock; import wile.engineersdecor.libmc.SlabSliceBlock;
import wile.engineersdecor.libmc.blocks.VariantSlabBlock; import wile.engineersdecor.libmc.VariantSlabBlock;
import wile.engineersdecor.libmc.detail.Auxiliaries; import wile.engineersdecor.libmc.Auxiliaries;
import wile.engineersdecor.libmc.detail.OptionalRecipeCondition; import wile.engineersdecor.libmc.OptionalRecipeCondition;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.*; import java.util.*;
@ -358,7 +358,7 @@ public class ModConfig
final ArrayList<String> includes = new ArrayList<>(); final ArrayList<String> includes = new ArrayList<>();
final ArrayList<String> excludes = new ArrayList<>(); final ArrayList<String> excludes = new ArrayList<>();
{ {
String inc = COMMON.pattern_includes.get().toLowerCase().replaceAll(MODID+":", "").replaceAll("[^*_,a-z0-9]", ""); String inc = COMMON.pattern_includes.get().toLowerCase().replaceAll(MODID+":", "").replaceAll("[^*_,a-z\\d]", "");
if(!COMMON.pattern_includes.get().equals(inc)) COMMON.pattern_includes.set(inc); if(!COMMON.pattern_includes.get().equals(inc)) COMMON.pattern_includes.set(inc);
String[] incl = inc.split(","); String[] incl = inc.split(",");
for(int i=0; i< incl.length; ++i) { for(int i=0; i< incl.length; ++i) {
@ -367,7 +367,7 @@ public class ModConfig
} }
} }
{ {
String exc = COMMON.pattern_excludes.get().toLowerCase().replaceAll(MODID+":", "").replaceAll("[^*_,a-z0-9]", ""); String exc = COMMON.pattern_excludes.get().toLowerCase().replaceAll(MODID+":", "").replaceAll("[^*_,a-z\\d]", "");
String[] excl = exc.split(","); String[] excl = exc.split(",");
for(int i=0; i< excl.length; ++i) { for(int i=0; i< excl.length; ++i) {
excl[i] = excl[i].replaceAll("[*]", ".*?"); excl[i] = excl[i].replaceAll("[*]", ".*?");

View file

@ -13,8 +13,6 @@
package wile.engineersdecor; package wile.engineersdecor;
import net.minecraft.client.gui.screens.MenuScreens; import net.minecraft.client.gui.screens.MenuScreens;
import net.minecraft.client.renderer.ItemBlockRenderTypes;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.entity.EntityRenderers; import net.minecraft.client.renderer.entity.EntityRenderers;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
@ -43,10 +41,7 @@ import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import wile.engineersdecor.blocks.*; import wile.engineersdecor.blocks.*;
import wile.engineersdecor.detail.ModRenderers; import wile.engineersdecor.detail.ModRenderers;
import wile.engineersdecor.items.EdItem; import wile.engineersdecor.items.EdItem;
import wile.engineersdecor.libmc.blocks.*; import wile.engineersdecor.libmc.*;
import wile.engineersdecor.libmc.blocks.StandardBlocks.IStandardBlock;
import wile.engineersdecor.libmc.detail.Auxiliaries;
import wile.engineersdecor.libmc.detail.Registries;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import java.util.ArrayList; import java.util.ArrayList;
@ -955,17 +950,18 @@ public class ModContent
public static void processContentClientSide(final FMLClientSetupEvent event) public static void processContentClientSide(final FMLClientSetupEvent event)
{ {
// Block renderer selection // Block renderer selection
for(Block block: Registries.getRegisteredBlocks()) { // Disabled in Forge, model based {"render_type": "cutout"/"translucent"}
if(block instanceof IStandardBlock) { // for(Block block: Registries.getRegisteredBlocks()) {
switch(((IStandardBlock)block).getRenderTypeHint()) { // if(block instanceof IStandardBlock) {
case CUTOUT: ItemBlockRenderTypes.setRenderLayer(block, RenderType.cutout()); break; // switch(((IStandardBlock)block).getRenderTypeHint()) {
case CUTOUT_MIPPED: ItemBlockRenderTypes.setRenderLayer(block, RenderType.cutoutMipped()); break; // case CUTOUT: ItemBlockRenderTypes.setRenderLayer(block, RenderType.cutout()); break;
case TRANSLUCENT: ItemBlockRenderTypes.setRenderLayer(block, RenderType.translucent()); break; // case CUTOUT_MIPPED: ItemBlockRenderTypes.setRenderLayer(block, RenderType.cutoutMipped()); break;
case TRANSLUCENT_NO_CRUMBLING: ItemBlockRenderTypes.setRenderLayer(block, RenderType.translucentNoCrumbling()); break; // case TRANSLUCENT: ItemBlockRenderTypes.setRenderLayer(block, RenderType.translucent()); break;
case SOLID: break; // case TRANSLUCENT_NO_CRUMBLING: ItemBlockRenderTypes.setRenderLayer(block, RenderType.translucentNoCrumbling()); break;
} // case SOLID: break;
} // }
} // }
// }
// Entity renderers // Entity renderers
EntityRenderers.register(Registries.getEntityType("et_chair"), ModRenderers.InvisibleEntityRenderer::new); EntityRenderers.register(Registries.getEntityType("et_chair"), ModRenderers.InvisibleEntityRenderer::new);
} }

View file

@ -1,6 +1,8 @@
package wile.engineersdecor; package wile.engineersdecor;
import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.player.Player;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.crafting.CraftingHelper; import net.minecraftforge.common.crafting.CraftingHelper;
import net.minecraftforge.event.entity.living.LivingEvent; import net.minecraftforge.event.entity.living.LivingEvent;
@ -13,9 +15,10 @@ import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import org.slf4j.Logger; import org.slf4j.Logger;
import wile.engineersdecor.blocks.EdLadderBlock; import wile.engineersdecor.blocks.EdLadderBlock;
import wile.engineersdecor.libmc.detail.Auxiliaries; import wile.engineersdecor.libmc.Auxiliaries;
import wile.engineersdecor.libmc.detail.OptionalRecipeCondition; import wile.engineersdecor.libmc.OptionalRecipeCondition;
import wile.engineersdecor.libmc.detail.Registries; import wile.engineersdecor.libmc.Overlay;
import wile.engineersdecor.libmc.Registries;
@Mod("engineersdecor") @Mod("engineersdecor")
@ -40,22 +43,19 @@ public class ModEngineersDecor
MinecraftForge.EVENT_BUS.register(this); MinecraftForge.EVENT_BUS.register(this);
} }
//
// Events
//
private void onSetup(final FMLCommonSetupEvent event) private void onSetup(final FMLCommonSetupEvent event)
{ {
CraftingHelper.register(OptionalRecipeCondition.Serializer.INSTANCE); CraftingHelper.register(OptionalRecipeCondition.Serializer.INSTANCE);
wile.engineersdecor.libmc.detail.Networking.init(MODID); wile.engineersdecor.libmc.Networking.init(MODID);
} }
private void onClientSetup(final FMLClientSetupEvent event) private void onClientSetup(final FMLClientSetupEvent event)
{ {
Overlay.TextOverlayGui.on_config(0.75, 0x00ffaa00, 0x55333333, 0x55333333, 0x55444444);
wile.engineersdecor.libmc.Networking.OverlayTextMessage.setHandler(Overlay.TextOverlayGui::show);
ModContent.registerMenuGuis(event); ModContent.registerMenuGuis(event);
ModContent.registerBlockEntityRenderers(event); ModContent.registerBlockEntityRenderers(event);
ModContent.processContentClientSide(event); ModContent.processContentClientSide(event);
wile.engineersdecor.libmc.detail.Overlay.register();
} }
@Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD) @Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD)
@ -77,14 +77,29 @@ public class ModEngineersDecor
} }
} }
//
// Player update event
//
@SubscribeEvent @SubscribeEvent
public void onPlayerEvent(final LivingEvent.LivingUpdateEvent event) public void onPlayerEvent(final LivingEvent.LivingTickEvent event)
{ {
if(!(event.getEntity() instanceof final Player player)) return; if(!(event.getEntity() instanceof final Player player)) return;
if(player.onClimbable()) EdLadderBlock.onPlayerUpdateEvent(player); if(player.onClimbable()) EdLadderBlock.onPlayerUpdateEvent(player);
} }
@OnlyIn(Dist.CLIENT)
@Mod.EventBusSubscriber(Dist.CLIENT)
public static class ForgeClientEvents
{
@SubscribeEvent
public static void onRenderGui(net.minecraftforge.client.event.RenderGuiOverlayEvent.Post event)
{ Overlay.TextOverlayGui.INSTANCE.onRenderGui(event.getPoseStack()); }
@SubscribeEvent
@OnlyIn(Dist.CLIENT)
public static void onRenderWorldOverlay(net.minecraftforge.client.event.RenderLevelStageEvent event)
{
if(event.getStage() == net.minecraftforge.client.event.RenderLevelStageEvent.Stage.AFTER_WEATHER) {
Overlay.TextOverlayGui.INSTANCE.onRenderWorldOverlay(event.getPoseStack(), event.getPartialTick());
}
}
}
} }

View file

@ -43,12 +43,12 @@ import net.minecraftforge.energy.CapabilityEnergy;
import net.minecraftforge.energy.IEnergyStorage; import net.minecraftforge.energy.IEnergyStorage;
import wile.engineersdecor.ModConfig; import wile.engineersdecor.ModConfig;
import wile.engineersdecor.ModContent; import wile.engineersdecor.ModContent;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.StandardBlocks;
import wile.engineersdecor.libmc.blocks.StandardEntityBlocks; import wile.engineersdecor.libmc.StandardEntityBlocks;
import wile.engineersdecor.libmc.detail.Auxiliaries; import wile.engineersdecor.libmc.Auxiliaries;
import wile.engineersdecor.libmc.detail.Inventories; import wile.engineersdecor.libmc.Inventories;
import wile.engineersdecor.libmc.detail.Overlay; import wile.engineersdecor.libmc.Overlay;
import wile.engineersdecor.libmc.detail.RfEnergy; import wile.engineersdecor.libmc.RfEnergy;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.HashSet; import java.util.HashSet;

View file

@ -31,16 +31,14 @@ import net.minecraft.world.level.material.Fluids;
import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.Vec3;
import wile.engineersdecor.ModContent; import wile.engineersdecor.libmc.StandardBlocks;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.Inventories;
import wile.engineersdecor.libmc.detail.Inventories;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
public class EdCatwalkBlock extends StandardBlocks.HorizontalFourWayWaterLoggable public class EdCatwalkBlock extends StandardBlocks.HorizontalFourWayWaterLoggable

View file

@ -35,8 +35,8 @@ import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraft.world.phys.shapes.VoxelShape;
import wile.engineersdecor.ModContent; import wile.engineersdecor.ModContent;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.StandardBlocks;
import wile.engineersdecor.libmc.detail.Auxiliaries; import wile.engineersdecor.libmc.Auxiliaries;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.*; import java.util.*;

View file

@ -33,7 +33,7 @@ import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraft.world.phys.shapes.VoxelShape;
import wile.engineersdecor.ModContent; import wile.engineersdecor.ModContent;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.StandardBlocks;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.ArrayList; import java.util.ArrayList;

View file

@ -33,7 +33,7 @@ import net.minecraftforge.network.PlayMessages;
import net.minecraftforge.network.NetworkHooks; import net.minecraftforge.network.NetworkHooks;
import wile.engineersdecor.ModConfig; import wile.engineersdecor.ModConfig;
import wile.engineersdecor.ModContent; import wile.engineersdecor.ModContent;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.StandardBlocks;
import java.util.List; import java.util.List;

View file

@ -28,7 +28,7 @@ import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.BlockHitResult;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.StandardBlocks;
import javax.annotation.Nullable; import javax.annotation.Nullable;

View file

@ -17,8 +17,8 @@ import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.Vec2; import net.minecraft.world.phys.Vec2;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.StandardBlocks;
import wile.engineersdecor.libmc.detail.Auxiliaries; import wile.engineersdecor.libmc.Auxiliaries;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.Arrays; import java.util.Arrays;

View file

@ -32,8 +32,8 @@ import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraft.world.phys.shapes.VoxelShape;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.StandardBlocks;
import wile.engineersdecor.libmc.detail.Auxiliaries; import wile.engineersdecor.libmc.Auxiliaries;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.ArrayList; import java.util.ArrayList;

View file

@ -48,16 +48,16 @@ import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.IItemHandler;
import wile.engineersdecor.ModConfig; import wile.engineersdecor.ModConfig;
import wile.engineersdecor.ModContent; import wile.engineersdecor.ModContent;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.StandardBlocks;
import wile.engineersdecor.libmc.blocks.StandardEntityBlocks; import wile.engineersdecor.libmc.StandardEntityBlocks;
import wile.engineersdecor.libmc.detail.Auxiliaries; import wile.engineersdecor.libmc.Auxiliaries;
import wile.engineersdecor.libmc.detail.Inventories; import wile.engineersdecor.libmc.Inventories;
import wile.engineersdecor.libmc.detail.Inventories.InventoryRange; import wile.engineersdecor.libmc.Inventories.InventoryRange;
import wile.engineersdecor.libmc.detail.Inventories.StorageInventory; import wile.engineersdecor.libmc.Inventories.StorageInventory;
import wile.engineersdecor.libmc.detail.Networking; import wile.engineersdecor.libmc.Networking;
import wile.engineersdecor.libmc.detail.RsSignals; import wile.engineersdecor.libmc.RsSignals;
import wile.engineersdecor.libmc.detail.TooltipDisplay.TipRange; import wile.engineersdecor.libmc.Guis;
import wile.engineersdecor.libmc.ui.Guis; import wile.engineersdecor.libmc.TooltipDisplay.TipRange;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.ArrayList; import java.util.ArrayList;

View file

@ -55,13 +55,10 @@ import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.items.ItemHandlerHelper; import net.minecraftforge.items.ItemHandlerHelper;
import wile.engineersdecor.ModConfig; import wile.engineersdecor.ModConfig;
import wile.engineersdecor.ModContent; import wile.engineersdecor.ModContent;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.*;
import wile.engineersdecor.libmc.blocks.StandardEntityBlocks; import wile.engineersdecor.libmc.Inventories.MappedItemHandler;
import wile.engineersdecor.libmc.detail.*; import wile.engineersdecor.libmc.Inventories.StorageInventory;
import wile.engineersdecor.libmc.detail.Inventories.MappedItemHandler; import wile.engineersdecor.libmc.TooltipDisplay.TipRange;
import wile.engineersdecor.libmc.detail.Inventories.StorageInventory;
import wile.engineersdecor.libmc.detail.TooltipDisplay.TipRange;
import wile.engineersdecor.libmc.ui.Guis;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.ArrayList; import java.util.ArrayList;
@ -887,11 +884,10 @@ public class EdElectricalFurnace
int we = energy_px(32, 8); int we = energy_px(32, 8);
if(we>0) blit(mx, x0+90, y0+54, 185, 30, we, 13); if(we>0) blit(mx, x0+90, y0+54, 185, 30, we, 13);
switch(getMenu().field(4)) { switch(getMenu().field(4)) {
case 0: blit(mx, x0+144, y0+57, 180, 57, 6, 9); break; case 0 -> blit(mx, x0 + 144, y0 + 57, 180, 57, 6, 9);
case 1: blit(mx, x0+142, y0+58, 190, 58, 9, 6); break; case 1 -> blit(mx, x0 + 142, y0 + 58, 190, 58, 9, 6);
case 2: blit(mx, x0+144, y0+56, 200, 57, 6, 9); break; case 2 -> blit(mx, x0 + 144, y0 + 56, 200, 57, 6, 9);
case 3: blit(mx, x0+143, y0+58, 210, 58, 9, 6); break; case 3 -> blit(mx, x0 + 143, y0 + 58, 210, 58, 9, 6);
default: break;
} }
} }

View file

@ -13,7 +13,7 @@ import net.minecraft.core.Direction;
import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.LevelReader;
import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import wile.engineersdecor.libmc.blocks.StandardFenceBlock; import wile.engineersdecor.libmc.StandardFenceBlock;
public class EdFenceBlock extends StandardFenceBlock public class EdFenceBlock extends StandardFenceBlock

View file

@ -19,7 +19,7 @@ import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.AABB;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.StandardBlocks;
import javax.annotation.Nullable; import javax.annotation.Nullable;

View file

@ -52,18 +52,17 @@ import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
import net.minecraftforge.fluids.capability.IFluidHandler; import net.minecraftforge.fluids.capability.IFluidHandler;
import wile.engineersdecor.ModConfig; import wile.engineersdecor.ModConfig;
import wile.engineersdecor.ModContent; import wile.engineersdecor.ModContent;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.StandardBlocks;
import wile.engineersdecor.libmc.blocks.StandardEntityBlocks; import wile.engineersdecor.libmc.StandardEntityBlocks;
import wile.engineersdecor.libmc.detail.Auxiliaries; import wile.engineersdecor.libmc.Auxiliaries;
import wile.engineersdecor.libmc.detail.Fluidics; import wile.engineersdecor.libmc.Fluidics;
import wile.engineersdecor.libmc.detail.Overlay; import wile.engineersdecor.libmc.Overlay;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
public class EdFluidBarrel public class EdFluidBarrel
{ {
//-------------------------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------------------------
@ -363,8 +362,8 @@ public class EdFluidBarrel
{ write_fluid_nbt(stack, fs.writeToNBT(new CompoundTag())); return stack; } { write_fluid_nbt(stack, fs.writeToNBT(new CompoundTag())); return stack; }
@Override @Override
public int getItemStackLimit(ItemStack stack) public int getMaxStackSize(ItemStack stack)
{ return (!getFluid(stack).isEmpty()) ? 1 : super.getItemStackLimit(stack); } { return (!getFluid(stack).isEmpty()) ? 1 : super.getMaxStackSize(stack); }
@Override @Override
public boolean isBarVisible(ItemStack stack) public boolean isBarVisible(ItemStack stack)
@ -383,11 +382,11 @@ public class EdFluidBarrel
{ return new Fluidics.FluidContainerItemCapabilityWrapper(stack, capacity_, item_fluid_handler_transfer_rate_, FluidBarrelItem::read_fluid_nbt, FluidBarrelItem::write_fluid_nbt, e->true); } { return new Fluidics.FluidContainerItemCapabilityWrapper(stack, capacity_, item_fluid_handler_transfer_rate_, FluidBarrelItem::read_fluid_nbt, FluidBarrelItem::write_fluid_nbt, e->true); }
@Override @Override
public boolean hasContainerItem(ItemStack stack) public boolean hasCraftingRemainingItem(ItemStack stack)
{ return (stack.getCount()==1) && (!getFluid(stack).isEmpty()); } { return (stack.getCount()==1) && (!getFluid(stack).isEmpty()); }
@Override @Override
public ItemStack getContainerItem(ItemStack stack) public ItemStack getCraftingRemainingItem(ItemStack stack)
{ {
if(stack.getCount()!=1) return ItemStack.EMPTY; if(stack.getCount()!=1) return ItemStack.EMPTY;
FluidStack fs = getFluid(stack); FluidStack fs = getFluid(stack);

View file

@ -45,9 +45,9 @@ import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
import net.minecraftforge.fluids.capability.IFluidHandler; import net.minecraftforge.fluids.capability.IFluidHandler;
import wile.engineersdecor.ModConfig; import wile.engineersdecor.ModConfig;
import wile.engineersdecor.ModContent; import wile.engineersdecor.ModContent;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.StandardBlocks;
import wile.engineersdecor.libmc.blocks.StandardEntityBlocks; import wile.engineersdecor.libmc.StandardEntityBlocks;
import wile.engineersdecor.libmc.detail.Fluidics; import wile.engineersdecor.libmc.Fluidics;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.*; import java.util.*;

View file

@ -49,9 +49,9 @@ import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.IItemHandler;
import wile.engineersdecor.ModConfig; import wile.engineersdecor.ModConfig;
import wile.engineersdecor.ModContent; import wile.engineersdecor.ModContent;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.StandardBlocks;
import wile.engineersdecor.libmc.blocks.StandardEntityBlocks; import wile.engineersdecor.libmc.StandardEntityBlocks;
import wile.engineersdecor.libmc.detail.Fluidics; import wile.engineersdecor.libmc.Fluidics;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;

View file

@ -57,15 +57,15 @@ import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.ForgeRegistries;
import wile.engineersdecor.ModConfig; import wile.engineersdecor.ModConfig;
import wile.engineersdecor.ModContent; import wile.engineersdecor.ModContent;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.StandardBlocks;
import wile.engineersdecor.libmc.blocks.StandardEntityBlocks; import wile.engineersdecor.libmc.StandardEntityBlocks;
import wile.engineersdecor.libmc.detail.Auxiliaries; import wile.engineersdecor.libmc.Auxiliaries;
import wile.engineersdecor.libmc.detail.Inventories; import wile.engineersdecor.libmc.Inventories;
import wile.engineersdecor.libmc.detail.Inventories.MappedItemHandler; import wile.engineersdecor.libmc.Inventories.MappedItemHandler;
import wile.engineersdecor.libmc.detail.Inventories.StorageInventory; import wile.engineersdecor.libmc.Inventories.StorageInventory;
import wile.engineersdecor.libmc.detail.Networking; import wile.engineersdecor.libmc.Networking;
import wile.engineersdecor.libmc.detail.RfEnergy; import wile.engineersdecor.libmc.RfEnergy;
import wile.engineersdecor.libmc.ui.Guis; import wile.engineersdecor.libmc.Guis;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.*; import java.util.*;
@ -228,9 +228,7 @@ public class EdFurnace
proc_fuel_efficiency_ = ((double) Mth.clamp(fuel_efficiency_percent, 10, 500)) / 100; proc_fuel_efficiency_ = ((double) Mth.clamp(fuel_efficiency_percent, 10, 500)) / 100;
boost_energy_consumption = TICK_INTERVAL * Mth.clamp(boost_energy_per_tick, 4, 4096); boost_energy_consumption = TICK_INTERVAL * Mth.clamp(boost_energy_per_tick, 4, 4096);
{ {
List<String> heater_resource_locations = Arrays.stream(accepted_heaters_csv.toLowerCase().split("[\\s,;]+")) List<String> heater_resource_locations = Arrays.stream(accepted_heaters_csv.toLowerCase().split("[\\s,;]+")).map(String::trim).toList();
.map(String::trim)
.collect(Collectors.toList());
accepted_heaters_.clear(); accepted_heaters_.clear();
for(String rlstr: heater_resource_locations) { for(String rlstr: heater_resource_locations) {
try { try {
@ -511,7 +509,7 @@ public class EdFurnace
if(!fuel.isEmpty()) { if(!fuel.isEmpty()) {
Item fuel_item = fuel.getItem(); Item fuel_item = fuel.getItem();
fuel.shrink(1); fuel.shrink(1);
if(fuel.isEmpty()) inventory_.setItem(SMELTING_FUEL_SLOT_NO, fuel_item.getContainerItem(fuel)); if(fuel.isEmpty()) inventory_.setItem(SMELTING_FUEL_SLOT_NO, fuel_item.getCraftingRemainingItem(fuel));
} }
} }
} }

View file

@ -20,8 +20,8 @@ import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.StandardBlocks;
import wile.engineersdecor.libmc.detail.Auxiliaries; import wile.engineersdecor.libmc.Auxiliaries;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.List; import java.util.List;

View file

@ -35,8 +35,8 @@ import net.minecraft.world.phys.Vec3;
import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraft.world.phys.shapes.VoxelShape;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.StandardBlocks;
import wile.engineersdecor.libmc.detail.Auxiliaries; import wile.engineersdecor.libmc.Auxiliaries;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.List; import java.util.List;

View file

@ -42,10 +42,7 @@ import net.minecraftforge.common.util.LazyOptional;
import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.IItemHandler;
import wile.engineersdecor.ModContent; import wile.engineersdecor.ModContent;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.*;
import wile.engineersdecor.libmc.blocks.StandardEntityBlocks;
import wile.engineersdecor.libmc.detail.*;
import wile.engineersdecor.libmc.ui.Guis;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.ArrayList; import java.util.ArrayList;

View file

@ -39,9 +39,9 @@ import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraft.world.phys.shapes.VoxelShape;
import wile.engineersdecor.ModContent; import wile.engineersdecor.ModContent;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.StandardBlocks;
import wile.engineersdecor.libmc.detail.Auxiliaries; import wile.engineersdecor.libmc.Auxiliaries;
import wile.engineersdecor.libmc.detail.Inventories; import wile.engineersdecor.libmc.Inventories;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.HashMap; import java.util.HashMap;

View file

@ -35,8 +35,8 @@ import net.minecraft.world.phys.shapes.VoxelShape;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import wile.engineersdecor.ModConfig; import wile.engineersdecor.ModConfig;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.StandardBlocks;
import wile.engineersdecor.libmc.detail.Auxiliaries; import wile.engineersdecor.libmc.Auxiliaries;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.List; import java.util.List;

View file

@ -52,9 +52,7 @@ import net.minecraftforge.items.ItemHandlerHelper;
import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.ForgeRegistries;
import wile.engineersdecor.ModConfig; import wile.engineersdecor.ModConfig;
import wile.engineersdecor.ModContent; import wile.engineersdecor.ModContent;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.*;
import wile.engineersdecor.libmc.blocks.StandardEntityBlocks;
import wile.engineersdecor.libmc.detail.*;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.HashMap; import java.util.HashMap;
@ -62,7 +60,6 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.UUID; import java.util.UUID;
import java.util.stream.Collectors;
public class EdMilker public class EdMilker
@ -356,7 +353,7 @@ public class EdMilker
cow.setNoAi(false); cow.setNoAi(false);
SingleMoveGoal.abortFor(cow); SingleMoveGoal.abortFor(cow);
tracked_cows_.remove(cow.getId()); tracked_cows_.remove(cow.getId());
for(int id:tracked_cows_.keySet().stream().filter(i->cow.getCommandSenderWorld().getEntity(i)==null).collect(Collectors.toList())) { for(int id: tracked_cows_.keySet().stream().filter(i->cow.getCommandSenderWorld().getEntity(i) == null).toList()) {
tracked_cows_.remove(id); tracked_cows_.remove(id);
} }
} }
@ -597,7 +594,7 @@ public class EdMilker
final Level world = entity.getCommandSenderWorld(); final Level world = entity.getCommandSenderWorld();
if(world != null) { if(world != null) {
// @todo: check nicer way to filter a map. // @todo: check nicer way to filter a map.
List<Integer> to_remove = tracked_entities_.keySet().stream().filter(i->(world.getEntity(i) == null)).collect(Collectors.toList()); List<Integer> to_remove = tracked_entities_.keySet().stream().filter(i->(world.getEntity(i) == null)).toList();
for(int id:to_remove)tracked_entities_.remove(id); for(int id:to_remove)tracked_entities_.remove(id);
} }
} }

View file

@ -55,12 +55,12 @@ import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.IItemHandler;
import wile.engineersdecor.ModConfig; import wile.engineersdecor.ModConfig;
import wile.engineersdecor.ModContent; import wile.engineersdecor.ModContent;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.StandardBlocks;
import wile.engineersdecor.libmc.blocks.StandardEntityBlocks; import wile.engineersdecor.libmc.StandardEntityBlocks;
import wile.engineersdecor.libmc.detail.Auxiliaries; import wile.engineersdecor.libmc.Auxiliaries;
import wile.engineersdecor.libmc.detail.Fluidics; import wile.engineersdecor.libmc.Fluidics;
import wile.engineersdecor.libmc.detail.Inventories; import wile.engineersdecor.libmc.Inventories;
import wile.engineersdecor.libmc.detail.RfEnergy; import wile.engineersdecor.libmc.RfEnergy;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.*; import java.util.*;

View file

@ -37,9 +37,9 @@ import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
import net.minecraftforge.fluids.capability.IFluidHandler; import net.minecraftforge.fluids.capability.IFluidHandler;
import wile.engineersdecor.ModConfig; import wile.engineersdecor.ModConfig;
import wile.engineersdecor.ModContent; import wile.engineersdecor.ModContent;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.StandardBlocks;
import wile.engineersdecor.libmc.blocks.StandardEntityBlocks; import wile.engineersdecor.libmc.StandardEntityBlocks;
import wile.engineersdecor.libmc.detail.RsSignals; import wile.engineersdecor.libmc.RsSignals;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;

View file

@ -54,10 +54,7 @@ import net.minecraftforge.fluids.IFluidBlock;
import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.IItemHandler;
import wile.engineersdecor.ModContent; import wile.engineersdecor.ModContent;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.*;
import wile.engineersdecor.libmc.blocks.StandardEntityBlocks;
import wile.engineersdecor.libmc.detail.*;
import wile.engineersdecor.libmc.ui.Guis;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.ArrayList; import java.util.ArrayList;

View file

@ -26,7 +26,7 @@ import net.minecraft.world.level.material.Fluids;
import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.Vec3;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.StandardBlocks;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.ArrayList; import java.util.ArrayList;

View file

@ -33,8 +33,8 @@ import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraft.world.phys.shapes.VoxelShape;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.StandardBlocks;
import wile.engineersdecor.libmc.detail.Auxiliaries; import wile.engineersdecor.libmc.Auxiliaries;
public class EdRoofBlock extends StandardBlocks.HorizontalWaterLoggable public class EdRoofBlock extends StandardBlocks.HorizontalWaterLoggable

View file

@ -31,11 +31,11 @@ import net.minecraftforge.energy.CapabilityEnergy;
import net.minecraftforge.energy.IEnergyStorage; import net.minecraftforge.energy.IEnergyStorage;
import wile.engineersdecor.ModConfig; import wile.engineersdecor.ModConfig;
import wile.engineersdecor.ModContent; import wile.engineersdecor.ModContent;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.StandardBlocks;
import wile.engineersdecor.libmc.blocks.StandardEntityBlocks; import wile.engineersdecor.libmc.StandardEntityBlocks;
import wile.engineersdecor.libmc.detail.Auxiliaries; import wile.engineersdecor.libmc.Auxiliaries;
import wile.engineersdecor.libmc.detail.Overlay; import wile.engineersdecor.libmc.Overlay;
import wile.engineersdecor.libmc.detail.RfEnergy; import wile.engineersdecor.libmc.RfEnergy;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.ArrayList; import java.util.ArrayList;

View file

@ -26,8 +26,8 @@ import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.Vec3;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.StandardBlocks;
import wile.engineersdecor.libmc.detail.Inventories; import wile.engineersdecor.libmc.Inventories;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.Arrays; import java.util.Arrays;

View file

@ -40,9 +40,8 @@ import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.ForgeRegistries;
import wile.engineersdecor.ModContent; import wile.engineersdecor.ModContent;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.*;
import wile.engineersdecor.libmc.blocks.StandardEntityBlocks;
import wile.engineersdecor.libmc.detail.*;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.ArrayList; import java.util.ArrayList;

View file

@ -37,10 +37,10 @@ import net.minecraftforge.energy.IEnergyStorage;
import wile.engineersdecor.ModConfig; import wile.engineersdecor.ModConfig;
import wile.engineersdecor.ModContent; import wile.engineersdecor.ModContent;
import wile.engineersdecor.detail.TreeCutting; import wile.engineersdecor.detail.TreeCutting;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.StandardBlocks;
import wile.engineersdecor.libmc.blocks.StandardEntityBlocks; import wile.engineersdecor.libmc.StandardEntityBlocks;
import wile.engineersdecor.libmc.detail.Auxiliaries; import wile.engineersdecor.libmc.Auxiliaries;
import wile.engineersdecor.libmc.detail.Overlay; import wile.engineersdecor.libmc.Overlay;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.Random; import java.util.Random;

View file

@ -15,7 +15,7 @@ import net.minecraft.world.level.block.IronBarsBlock;
import net.minecraft.world.level.block.StainedGlassPaneBlock; import net.minecraft.world.level.block.StainedGlassPaneBlock;
import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import wile.engineersdecor.libmc.blocks.VariantWallBlock; import wile.engineersdecor.libmc.VariantWallBlock;
public class EdWallBlock extends VariantWallBlock public class EdWallBlock extends VariantWallBlock

View file

@ -44,13 +44,13 @@ import net.minecraftforge.items.IItemHandler;
import wile.engineersdecor.ModConfig; import wile.engineersdecor.ModConfig;
import wile.engineersdecor.ModContent; import wile.engineersdecor.ModContent;
import wile.engineersdecor.blocks.EdFurnace.FurnaceBlock; import wile.engineersdecor.blocks.EdFurnace.FurnaceBlock;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.StandardBlocks;
import wile.engineersdecor.libmc.blocks.StandardEntityBlocks; import wile.engineersdecor.libmc.StandardEntityBlocks;
import wile.engineersdecor.libmc.detail.Auxiliaries; import wile.engineersdecor.libmc.Auxiliaries;
import wile.engineersdecor.libmc.detail.Inventories; import wile.engineersdecor.libmc.Inventories;
import wile.engineersdecor.libmc.detail.RfEnergy; import wile.engineersdecor.libmc.RfEnergy;
import wile.engineersdecor.libmc.detail.RsSignals; import wile.engineersdecor.libmc.RsSignals;
import wile.engineersdecor.libmc.ui.Guis; import wile.engineersdecor.libmc.Guis;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.ArrayList; import java.util.ArrayList;
@ -273,11 +273,7 @@ public class EdWasteIncinerator
} }
@Override @Override
public void set(int id, int value) public void set(int id, int value)
{ {}
switch(id) {
default: break;
}
}
}; };
// Capability export ---------------------------------------------------------------------------- // Capability export ----------------------------------------------------------------------------

View file

@ -24,7 +24,7 @@ import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.Fluids; import net.minecraft.world.level.material.Fluids;
import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.BlockHitResult;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.StandardBlocks;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.Arrays; import java.util.Arrays;

View file

@ -11,7 +11,6 @@ package wile.engineersdecor.detail;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Vec3i; import net.minecraft.core.Vec3i;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.BlockTags; import net.minecraft.tags.BlockTags;
import net.minecraft.util.Mth; import net.minecraft.util.Mth;
import net.minecraft.world.level.Level; import net.minecraft.world.level.Level;
@ -19,8 +18,6 @@ import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.LeavesBlock; import net.minecraft.world.level.block.LeavesBlock;
import net.minecraft.world.level.block.VineBlock; import net.minecraft.world.level.block.VineBlock;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import wile.engineersdecor.ModEngineersDecor;
import wile.engineersdecor.libmc.detail.Auxiliaries;
import java.util.*; import java.util.*;

View file

@ -17,8 +17,8 @@ import net.minecraft.world.level.Level;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import wile.engineersdecor.ModConfig; import wile.engineersdecor.ModConfig;
import wile.engineersdecor.libmc.detail.Auxiliaries; import wile.engineersdecor.libmc.Auxiliaries;
import wile.engineersdecor.libmc.detail.Registries; import wile.engineersdecor.libmc.Registries;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.ArrayList; import java.util.ArrayList;

View file

@ -6,7 +6,7 @@
* *
* General commonly used functionality. * General commonly used functionality.
*/ */
package wile.engineersdecor.libmc.detail; package wile.engineersdecor.libmc;
import com.mojang.blaze3d.platform.InputConstants; import com.mojang.blaze3d.platform.InputConstants;
import net.minecraft.ChatFormatting; import net.minecraft.ChatFormatting;
@ -117,6 +117,9 @@ public class Auxiliaries
public static void logError(final String msg) public static void logError(final String msg)
{ logger.error(msg); } { logger.error(msg); }
public static void logDebug(final String msg)
{ /*logger.debug(msg);*/ }
// ------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------
// Localization, text formatting // Localization, text formatting
// ------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------

View file

@ -1,4 +1,4 @@
package wile.engineersdecor.libmc.ui; package wile.engineersdecor.libmc;
import net.minecraft.util.Mth; import net.minecraft.util.Mth;
import net.minecraft.world.Container; import net.minecraft.world.Container;

View file

@ -6,7 +6,7 @@
* *
* Recipe utility functionality. * Recipe utility functionality.
*/ */
package wile.engineersdecor.libmc.detail; package wile.engineersdecor.libmc;
import net.minecraft.core.NonNullList; import net.minecraft.core.NonNullList;
import net.minecraft.resources.ResourceLocation; import net.minecraft.resources.ResourceLocation;

View file

@ -6,7 +6,7 @@
* *
* General fluid handling functionality. * General fluid handling functionality.
*/ */
package wile.engineersdecor.libmc.detail; package wile.engineersdecor.libmc;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;

View file

@ -6,9 +6,7 @@
* *
* Gui Wrappers and Widgets. * Gui Wrappers and Widgets.
*/ */
package wile.engineersdecor.libmc.ui; package wile.engineersdecor.libmc;
import wile.engineersdecor.libmc.detail.Auxiliaries;
import wile.engineersdecor.libmc.detail.TooltipDisplay;
import com.mojang.blaze3d.platform.Window; import com.mojang.blaze3d.platform.Window;
import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.systems.RenderSystem;

View file

@ -6,7 +6,7 @@
* *
* General inventory item handling functionality. * General inventory item handling functionality.
*/ */
package wile.engineersdecor.libmc.detail; package wile.engineersdecor.libmc;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;

View file

@ -6,7 +6,7 @@
* *
* Main client/server message handling. * Main client/server message handling.
*/ */
package wile.engineersdecor.libmc.detail; package wile.engineersdecor.libmc;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;

View file

@ -6,7 +6,7 @@
* *
* Recipe condition to enable opt'ing out JSON based recipes. * Recipe condition to enable opt'ing out JSON based recipes.
*/ */
package wile.engineersdecor.libmc.detail; package wile.engineersdecor.libmc;
import com.google.gson.JsonArray; import com.google.gson.JsonArray;
import com.google.gson.JsonElement; import com.google.gson.JsonElement;

View file

@ -6,10 +6,9 @@
* *
* Renders status messages in one line. * Renders status messages in one line.
*/ */
package wile.engineersdecor.libmc.detail; package wile.engineersdecor.libmc;
import com.mojang.blaze3d.platform.Window; import com.mojang.blaze3d.platform.Window;
import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Font; import net.minecraft.client.gui.Font;
import net.minecraft.client.gui.screens.Screen; import net.minecraft.client.gui.screens.Screen;
@ -27,13 +26,7 @@ import net.minecraft.world.level.LightLayer;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.client.event.RenderLevelLastEvent;
import net.minecraftforge.client.model.data.EmptyModelData;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.DistExecutor; import net.minecraftforge.fml.DistExecutor;
import net.minecraftforge.fml.common.Mod;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.Optional; import java.util.Optional;
@ -41,14 +34,6 @@ import java.util.Optional;
public class Overlay public class Overlay
{ {
public static void register()
{
if(SidedProxy.mc() != null) {
MinecraftForge.EVENT_BUS.register(new TextOverlayGui());
Networking.OverlayTextMessage.setHandler(TextOverlayGui::show);
}
}
public static void show(Player player, final Component message) public static void show(Player player, final Component message)
{ Networking.OverlayTextMessage.sendToPlayer(player, message, 3000); } { Networking.OverlayTextMessage.sendToPlayer(player, message, 3000); }
@ -65,10 +50,10 @@ public class Overlay
// Client side handler // Client side handler
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
@Mod.EventBusSubscriber(Dist.CLIENT)
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public static class TextOverlayGui extends Screen public static class TextOverlayGui extends Screen
{ {
public static final TextOverlayGui INSTANCE = new TextOverlayGui();
private static final Component EMPTY_TEXT = Component.literal(""); private static final Component EMPTY_TEXT = Component.literal("");
private static final BlockState EMPTY_STATE = null; private static final BlockState EMPTY_STATE = null;
private static double overlay_y_ = 0.75; private static double overlay_y_ = 0.75;
@ -76,7 +61,6 @@ public class Overlay
private static int border_color_ = 0xaa333333; private static int border_color_ = 0xaa333333;
private static int background_color1_ = 0xaa333333; private static int background_color1_ = 0xaa333333;
private static int background_color2_ = 0xaa444444; private static int background_color2_ = 0xaa444444;
private final Minecraft mc;
private static long text_deadline_ = 0; private static long text_deadline_ = 0;
private static Component text_ = EMPTY_TEXT; private static Component text_ = EMPTY_TEXT;
private static long state_deadline_ = 0; private static long state_deadline_ = 0;
@ -117,17 +101,15 @@ public class Overlay
{ return ((state_deadline_ < System.currentTimeMillis()) || (state_==EMPTY_STATE)) ? Optional.empty() : Optional.of(new Tuple<>(state_, pos_)); } { return ((state_deadline_ < System.currentTimeMillis()) || (state_==EMPTY_STATE)) ? Optional.empty() : Optional.of(new Tuple<>(state_, pos_)); }
TextOverlayGui() TextOverlayGui()
{ super(Component.literal("")); mc = SidedProxy.mc(); } { super(Component.literal("")); }
@SubscribeEvent public void onRenderGui(final com.mojang.blaze3d.vertex.PoseStack mxs)
public void onRenderGui(RenderGameOverlayEvent.Post event)
{ {
if(event.getType() != RenderGameOverlayEvent.ElementType.CHAT) return;
if(deadline() < System.currentTimeMillis()) return; if(deadline() < System.currentTimeMillis()) return;
if(text()==EMPTY_TEXT) return; if(text()==EMPTY_TEXT) return;
String txt = text().getString(); String txt = text().getString();
if(txt.isEmpty()) return; if(txt.isEmpty()) return;
PoseStack mxs = event.getPoseStack(); final net.minecraft.client.Minecraft mc = net.minecraft.client.Minecraft.getInstance();
final Window win = mc.getWindow(); final Window win = mc.getWindow();
final Font fr = mc.font; final Font fr = mc.font;
final boolean was_unicode = fr.isBidirectional(); final boolean was_unicode = fr.isBidirectional();
@ -143,8 +125,8 @@ public class Overlay
drawCenteredString(mxs, fr, text(), cx , cy+1, 0x00ffaa00); drawCenteredString(mxs, fr, text(), cx , cy+1, 0x00ffaa00);
} }
@SubscribeEvent @SuppressWarnings("deprecation")
public void onRenderWorldOverlay(RenderLevelLastEvent event) public void onRenderWorldOverlay(final com.mojang.blaze3d.vertex.PoseStack mxs, final double partialTick)
{ {
final Optional<Tuple<BlockState,BlockPos>> sp = state_pos(); final Optional<Tuple<BlockState,BlockPos>> sp = state_pos();
if(sp.isEmpty()) return; if(sp.isEmpty()) return;
@ -153,16 +135,14 @@ public class Overlay
if((player==null) || (world==null)) return; if((player==null) || (world==null)) return;
final BlockState state = sp.get().getA(); final BlockState state = sp.get().getA();
final BlockPos pos = sp.get().getB(); final BlockPos pos = sp.get().getB();
@SuppressWarnings("deprecation")
final int light = (world.hasChunkAt(pos)) ? LightTexture.pack(world.getBrightness(LightLayer.BLOCK, pos), world.getBrightness(LightLayer.SKY, pos)) : LightTexture.pack(15, 15); final int light = (world.hasChunkAt(pos)) ? LightTexture.pack(world.getBrightness(LightLayer.BLOCK, pos), world.getBrightness(LightLayer.SKY, pos)) : LightTexture.pack(15, 15);
final MultiBufferSource buffer = Minecraft.getInstance().renderBuffers().bufferSource(); final MultiBufferSource buffer = Minecraft.getInstance().renderBuffers().bufferSource();
final PoseStack mxs = event.getPoseStack(); final double px = Mth.lerp(partialTick, player.xo, player.getX());
final double px = Mth.lerp(event.getPartialTick(), player.xo, player.getX()); final double py = Mth.lerp(partialTick, player.yo, player.getY());
final double py = Mth.lerp(event.getPartialTick(), player.yo, player.getY()); final double pz = Mth.lerp(partialTick, player.zo, player.getZ());
final double pz = Mth.lerp(event.getPartialTick(), player.zo, player.getZ());
mxs.pushPose(); mxs.pushPose();
mxs.translate((pos.getX()-px), (pos.getY()-py-player.getEyeHeight()), (pos.getZ()-pz)); mxs.translate((pos.getX()-px), (pos.getY()-py-player.getEyeHeight()), (pos.getZ()-pz));
Minecraft.getInstance().getBlockRenderer().renderSingleBlock(state, mxs, buffer, light, OverlayTexture.NO_OVERLAY, EmptyModelData.INSTANCE); Minecraft.getInstance().getBlockRenderer().renderSingleBlock(state, mxs, buffer, light, OverlayTexture.NO_OVERLAY);
mxs.popPose(); mxs.popPose();
} }

View file

@ -6,7 +6,7 @@
* *
* Common game registry handling. * Common game registry handling.
*/ */
package wile.engineersdecor.libmc.detail; package wile.engineersdecor.libmc;
import net.minecraft.resources.ResourceLocation; import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.TagKey; import net.minecraft.tags.TagKey;
@ -60,9 +60,9 @@ public class Registries
creative_tab_icon = creative_tab_icon_item_name; creative_tab_icon = creative_tab_icon_item_name;
BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, modid); BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, modid);
ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, modid); ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, modid);
BLOCK_ENTITIES = DeferredRegister.create(ForgeRegistries.BLOCK_ENTITIES, modid); BLOCK_ENTITIES = DeferredRegister.create(ForgeRegistries.BLOCK_ENTITY_TYPES, modid);
MENUS = DeferredRegister.create(ForgeRegistries.CONTAINERS, modid); MENUS = DeferredRegister.create(ForgeRegistries.MENU_TYPES, modid);
ENTITIES = DeferredRegister.create(ForgeRegistries.ENTITIES, modid); ENTITIES = DeferredRegister.create(ForgeRegistries.ENTITY_TYPES, modid);
RECIPE_SERIALIZERS = DeferredRegister.create(ForgeRegistries.RECIPE_SERIALIZERS, modid); RECIPE_SERIALIZERS = DeferredRegister.create(ForgeRegistries.RECIPE_SERIALIZERS, modid);
List.of(BLOCKS, ITEMS, BLOCK_ENTITIES, MENUS, ENTITIES, RECIPE_SERIALIZERS).forEach(registrar); List.of(BLOCKS, ITEMS, BLOCK_ENTITIES, MENUS, ENTITIES, RECIPE_SERIALIZERS).forEach(registrar);
} }

View file

@ -6,7 +6,7 @@
* *
* General RF/FE energy handling functionality. * General RF/FE energy handling functionality.
*/ */
package wile.engineersdecor.libmc.detail; package wile.engineersdecor.libmc;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;

View file

@ -6,7 +6,7 @@
* *
* General redstone signal related functionality. * General redstone signal related functionality.
*/ */
package wile.engineersdecor.libmc.detail; package wile.engineersdecor.libmc;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;

View file

@ -4,9 +4,9 @@
* @copyright (C) 2020 Stefan Wilhelm * @copyright (C) 2020 Stefan Wilhelm
* @license MIT (see https://opensource.org/licenses/MIT) * @license MIT (see https://opensource.org/licenses/MIT)
* *
* General client/server sideness selection proxy. * General client/server sidedness selection proxy.
*/ */
package wile.engineersdecor.libmc.detail; package wile.engineersdecor.libmc;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.player.Player;

View file

@ -7,7 +7,7 @@
* Half slab ("slab slices") characteristics class. Actually * Half slab ("slab slices") characteristics class. Actually
* it's now a quarter slab, but who cares. * it's now a quarter slab, but who cares.
*/ */
package wile.engineersdecor.libmc.blocks; package wile.engineersdecor.libmc;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
@ -40,7 +40,6 @@ import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraft.world.phys.shapes.VoxelShape;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import wile.engineersdecor.libmc.detail.Auxiliaries;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.ArrayList; import java.util.ArrayList;

View file

@ -6,7 +6,7 @@
* *
* Common functionality class for decor blocks. * Common functionality class for decor blocks.
*/ */
package wile.engineersdecor.libmc.blocks; package wile.engineersdecor.libmc;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
@ -15,8 +15,6 @@ import net.minecraft.server.level.ServerLevel;
import net.minecraft.sounds.SoundEvent; import net.minecraft.sounds.SoundEvent;
import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.SpawnPlacements; import net.minecraft.world.entity.SpawnPlacements;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.item.context.BlockPlaceContext;
@ -49,7 +47,6 @@ import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraft.world.phys.shapes.VoxelShape;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import wile.engineersdecor.libmc.detail.Auxiliaries;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.*; import java.util.*;

View file

@ -6,7 +6,7 @@
* *
* Door blocks, almost entirely based on vanilla. * Door blocks, almost entirely based on vanilla.
*/ */
package wile.engineersdecor.libmc.blocks; package wile.engineersdecor.libmc;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
@ -38,7 +38,6 @@ import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraft.world.phys.shapes.VoxelShape;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import wile.engineersdecor.libmc.detail.Auxiliaries;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.List; import java.util.List;

View file

@ -6,8 +6,7 @@
* *
* Common functionality class for blocks with block entities. * Common functionality class for blocks with block entities.
*/ */
package wile.engineersdecor.libmc.blocks; package wile.engineersdecor.libmc;
import wile.engineersdecor.libmc.detail.Registries;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerLevel;

View file

@ -6,7 +6,7 @@
* *
* Wall blocks. * Wall blocks.
*/ */
package wile.engineersdecor.libmc.blocks; package wile.engineersdecor.libmc;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
@ -38,7 +38,6 @@ import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraft.world.phys.shapes.VoxelShape;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import wile.engineersdecor.libmc.detail.Auxiliaries;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.List; import java.util.List;

View file

@ -6,7 +6,7 @@
* *
* Stairs and roof blocks, almost entirely based on vanilla stairs. * Stairs and roof blocks, almost entirely based on vanilla stairs.
*/ */
package wile.engineersdecor.libmc.blocks; package wile.engineersdecor.libmc;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Component;
@ -21,7 +21,6 @@ import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.level.material.PushReaction;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import wile.engineersdecor.libmc.detail.Auxiliaries;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.List; import java.util.List;

View file

@ -7,11 +7,11 @@
* Delayed tooltip for a selected area. Constructed with a * Delayed tooltip for a selected area. Constructed with a
* GUI, invoked in `render()`. * GUI, invoked in `render()`.
*/ */
package wile.engineersdecor.libmc.detail; package wile.engineersdecor.libmc;
import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen; import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
import net.minecraft.network.chat.Component; import net.minecraft.network.chat.*;
import net.minecraft.util.Mth; import net.minecraft.util.Mth;
import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.inventory.AbstractContainerMenu;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
@ -26,7 +26,7 @@ import java.util.function.Supplier;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public class TooltipDisplay public class TooltipDisplay
{ {
private static long default_delay = 450; private static long default_delay = 800;
private static int default_max_deviation = 1; private static int default_max_deviation = 1;
public static void config(long delay, int max_deviation) public static void config(long delay, int max_deviation)
@ -97,10 +97,10 @@ public class TooltipDisplay
} else if(ranges.stream().noneMatch( } else if(ranges.stream().noneMatch(
(tip)->{ (tip)->{
if((x<tip.x0) || (x>tip.x1) || (y<tip.y0) || (y>tip.y1)) return false; if((x<tip.x0) || (x>tip.x1) || (y<tip.y0) || (y>tip.y1)) return false;
String text = tip.text.get().getString(); String text = tip.text.get().toString();
if(text.isEmpty()) return false; if(text.isEmpty()) return false;
try { try {
gui.renderTooltip(mx, tip.text.get(), x, y); gui.renderComponentTooltip(mx, tip.text.get().toFlatList(Style.EMPTY), x, y);
} catch(Exception ex) { } catch(Exception ex) {
had_render_exception = true; had_render_exception = true;
Auxiliaries.logError("Tooltip rendering disabled due to exception: '" + ex.getMessage() + "'"); Auxiliaries.logError("Tooltip rendering disabled due to exception: '" + ex.getMessage() + "'");

View file

@ -6,7 +6,7 @@
* *
* Standard half block horizontal slab characteristics class. * Standard half block horizontal slab characteristics class.
*/ */
package wile.engineersdecor.libmc.blocks; package wile.engineersdecor.libmc;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
@ -43,7 +43,6 @@ import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraft.world.phys.shapes.VoxelShape;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import wile.engineersdecor.libmc.detail.Auxiliaries;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.ArrayList; import java.util.ArrayList;

View file

@ -6,7 +6,7 @@
* *
* Wall blocks. * Wall blocks.
*/ */
package wile.engineersdecor.libmc.blocks; package wile.engineersdecor.libmc;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableMap.Builder; import com.google.common.collect.ImmutableMap.Builder;
@ -37,7 +37,6 @@ import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraft.world.phys.shapes.VoxelShape;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import wile.engineersdecor.libmc.detail.Auxiliaries;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.List; import java.util.List;

View file

@ -19,7 +19,7 @@ logoFile="logo.png"
[[dependencies.engineersdecor]] [[dependencies.engineersdecor]]
modId="forge" modId="forge"
mandatory=true mandatory=true
versionRange="[41,)" versionRange="[41.1.0,)"
ordering="NONE" ordering="NONE"
side="BOTH" side="BOTH"

View file

@ -1,4 +1,5 @@
{ {
"render_type": "cutout",
"textures": { "textures": {
"particle": "engineersdecor:block/pipe/fluid_barrel_side0", "particle": "engineersdecor:block/pipe/fluid_barrel_side0",
"s": "engineersdecor:block/pipe/fluid_barrel_side0", "s": "engineersdecor:block/pipe/fluid_barrel_side0",

View file

@ -1,6 +1,4 @@
{ {
"parent": "engineersdecor:block/device/fluid_barrel_model0", "parent": "engineersdecor:block/device/fluid_barrel_model0",
"textures": { "textures": { "s" : "engineersdecor:block/pipe/fluid_barrel_side3" }
"s" : "engineersdecor:block/pipe/fluid_barrel_side3"
}
} }

View file

@ -1,5 +1,6 @@
{ {
"ambientocclusion": false, "ambientocclusion": false,
"render_type": "translucent",
"textures": { "textures": {
"bottom": "engineersdecor:block/door/metal_sliding_door_texture_bottom", "bottom": "engineersdecor:block/door/metal_sliding_door_texture_bottom",
"particle": "engineersdecor:block/door/metal_sliding_door_texture_side" "particle": "engineersdecor:block/door/metal_sliding_door_texture_side"

View file

@ -1,5 +1,6 @@
{ {
"ambientocclusion": false, "ambientocclusion": false,
"render_type": "translucent",
"textures": { "textures": {
"bottom": "engineersdecor:block/door/metal_sliding_door_texture_bottom", "bottom": "engineersdecor:block/door/metal_sliding_door_texture_bottom",
"particle": "engineersdecor:block/door/metal_sliding_door_texture_side" "particle": "engineersdecor:block/door/metal_sliding_door_texture_side"

View file

@ -1,5 +1,6 @@
{ {
"parent": "block/block", "parent": "block/block",
"render_type": "translucent",
"ambientocclusion": false, "ambientocclusion": false,
"textures": { "textures": {
"bottom": "engineersdecor:block/door/metal_sliding_door_texture_bottom", "bottom": "engineersdecor:block/door/metal_sliding_door_texture_bottom",

View file

@ -1,5 +1,6 @@
{ {
"ambientocclusion": false, "ambientocclusion": false,
"render_type": "translucent",
"textures": { "textures": {
"top": "engineersdecor:block/door/metal_sliding_door_texture_top", "top": "engineersdecor:block/door/metal_sliding_door_texture_top",
"particle": "engineersdecor:block/door/metal_sliding_door_texture_side", "particle": "engineersdecor:block/door/metal_sliding_door_texture_side",

View file

@ -1,5 +1,6 @@
{ {
"ambientocclusion": false, "ambientocclusion": false,
"render_type": "translucent",
"textures": { "textures": {
"top": "engineersdecor:block/door/metal_sliding_door_texture_top", "top": "engineersdecor:block/door/metal_sliding_door_texture_top",
"particle": "engineersdecor:block/door/metal_sliding_door_texture_side" "particle": "engineersdecor:block/door/metal_sliding_door_texture_side"

View file

@ -1,6 +1,7 @@
{ {
"parent": "block/block", "parent": "block/block",
"ambientocclusion": false, "ambientocclusion": false,
"render_type": "translucent",
"textures": { "textures": {
"glass": "engineersdecor:block/glass/window_glass_texture" "glass": "engineersdecor:block/glass/window_glass_texture"
}, },

View file

@ -1,6 +1,7 @@
{ {
"parent": "block/block", "parent": "block/block",
"ambientocclusion": false, "ambientocclusion": false,
"render_type": "cutout",
"textures": { "textures": {
"particle": "engineersdecor:block/furniture/steel_catwalk_side", "particle": "engineersdecor:block/furniture/steel_catwalk_side",
"s": "engineersdecor:block/furniture/steel_catwalk_side", "s": "engineersdecor:block/furniture/steel_catwalk_side",

View file

@ -1,6 +1,7 @@
{ {
"parent": "block/block", "parent": "block/block",
"ambientocclusion": false, "ambientocclusion": false,
"render_type": "cutout",
"textures": { "textures": {
"frame": "engineersdecor:block/material/steel_texture", "frame": "engineersdecor:block/material/steel_texture",
"particle": "engineersdecor:block/furniture/steel_catwalk_side", "particle": "engineersdecor:block/furniture/steel_catwalk_side",

View file

@ -1,6 +1,7 @@
{ {
"parent": "block/block", "parent": "block/block",
"ambientocclusion": false, "ambientocclusion": false,
"render_type": "cutout",
"textures": { "textures": {
"frame": "engineersdecor:block/material/steel_texture", "frame": "engineersdecor:block/material/steel_texture",
"particle": "engineersdecor:block/furniture/steel_catwalk_side", "particle": "engineersdecor:block/furniture/steel_catwalk_side",

View file

@ -1,6 +1,7 @@
{ {
"parent": "block/block", "parent": "block/block",
"ambientocclusion": false, "ambientocclusion": false,
"render_type": "cutout",
"textures": { "textures": {
"frame": "engineersdecor:block/material/steel_texture", "frame": "engineersdecor:block/material/steel_texture",
"particle": "engineersdecor:block/furniture/steel_catwalk_side", "particle": "engineersdecor:block/furniture/steel_catwalk_side",

View file

@ -1,6 +1,7 @@
{ {
"parent": "block/block", "parent": "block/block",
"ambientocclusion": false, "ambientocclusion": false,
"render_type": "cutout",
"textures": { "textures": {
"frame": "engineersdecor:block/material/steel_texture", "frame": "engineersdecor:block/material/steel_texture",
"particle": "engineersdecor:block/furniture/steel_catwalk_side", "particle": "engineersdecor:block/furniture/steel_catwalk_side",

View file

@ -1,6 +1,7 @@
{ {
"parent": "block/block", "parent": "block/block",
"ambientocclusion": false, "ambientocclusion": false,
"render_type": "cutout",
"textures": { "textures": {
"frame": "engineersdecor:block/material/steel_texture", "frame": "engineersdecor:block/material/steel_texture",
"particle": "engineersdecor:block/furniture/steel_catwalk_side", "particle": "engineersdecor:block/furniture/steel_catwalk_side",

View file

@ -1,6 +1,7 @@
{ {
"parent": "block/block", "parent": "block/block",
"ambientocclusion": false, "ambientocclusion": false,
"render_type": "cutout",
"textures": { "textures": {
"particle": "engineersdecor:block/furniture/steel_catwalk_side", "particle": "engineersdecor:block/furniture/steel_catwalk_side",
"s": "engineersdecor:block/furniture/steel_catwalk_side", "s": "engineersdecor:block/furniture/steel_catwalk_side",

View file

@ -1,6 +1,7 @@
{ {
"parent": "block/block", "parent": "block/block",
"ambientocclusion": false, "ambientocclusion": false,
"render_type": "cutout",
"textures": { "textures": {
"particle": "engineersdecor:block/furniture/steel_catwalk_side", "particle": "engineersdecor:block/furniture/steel_catwalk_side",
"s": "engineersdecor:block/furniture/steel_catwalk_side", "s": "engineersdecor:block/furniture/steel_catwalk_side",

View file

@ -1,6 +1,7 @@
{ {
"parent": "block/block", "parent": "block/block",
"ambientocclusion": false, "ambientocclusion": false,
"render_type": "cutout",
"textures": { "textures": {
"particle": "engineersdecor:block/furniture/steel_catwalk_side", "particle": "engineersdecor:block/furniture/steel_catwalk_side",
"s": "engineersdecor:block/furniture/steel_catwalk_side", "s": "engineersdecor:block/furniture/steel_catwalk_side",

View file

@ -1,6 +1,7 @@
{ {
"parent": "block/block", "parent": "block/block",
"ambientocclusion": false, "ambientocclusion": false,
"render_type": "cutout",
"textures": { "textures": {
"particle": "engineersdecor:block/furniture/steel_catwalk_side", "particle": "engineersdecor:block/furniture/steel_catwalk_side",
"s": "engineersdecor:block/furniture/steel_catwalk_side", "s": "engineersdecor:block/furniture/steel_catwalk_side",

View file

@ -1,6 +1,7 @@
{ {
"parent": "block/block", "parent": "block/block",
"ambientocclusion": false, "ambientocclusion": false,
"render_type": "cutout",
"textures": { "textures": {
"particle": "engineersdecor:block/furniture/steel_catwalk_side", "particle": "engineersdecor:block/furniture/steel_catwalk_side",
"s": "engineersdecor:block/furniture/steel_catwalk_side", "s": "engineersdecor:block/furniture/steel_catwalk_side",

View file

@ -1,6 +1,7 @@
{ {
"parent": "block/block", "parent": "block/block",
"ambientocclusion": false, "ambientocclusion": false,
"render_type": "cutout",
"textures": { "textures": {
"particle": "engineersdecor:block/furniture/steel_catwalk_side", "particle": "engineersdecor:block/furniture/steel_catwalk_side",
"s": "engineersdecor:block/furniture/steel_catwalk_side", "s": "engineersdecor:block/furniture/steel_catwalk_side",

View file

@ -1,6 +1,7 @@
{ {
"parent": "block/block", "parent": "block/block",
"ambientocclusion": false, "ambientocclusion": false,
"render_type": "cutout",
"textures": { "textures": {
"particle": "engineersdecor:block/furniture/steel_catwalk_side", "particle": "engineersdecor:block/furniture/steel_catwalk_side",
"s": "engineersdecor:block/furniture/steel_catwalk_side", "s": "engineersdecor:block/furniture/steel_catwalk_side",

View file

@ -1,6 +1,7 @@
{ {
"parent": "block/block", "parent": "block/block",
"ambientocclusion": false, "ambientocclusion": false,
"render_type": "cutout",
"textures": { "textures": {
"particle": "engineersdecor:block/furniture/steel_catwalk_side", "particle": "engineersdecor:block/furniture/steel_catwalk_side",
"s": "engineersdecor:block/furniture/steel_catwalk_side", "s": "engineersdecor:block/furniture/steel_catwalk_side",

View file

@ -1,6 +1,7 @@
{ {
"parent": "block/block", "parent": "block/block",
"ambientocclusion": false, "ambientocclusion": false,
"render_type": "cutout",
"textures": { "textures": {
"particle": "engineersdecor:block/furniture/steel_catwalk_side", "particle": "engineersdecor:block/furniture/steel_catwalk_side",
"s": "engineersdecor:block/furniture/steel_catwalk_side", "s": "engineersdecor:block/furniture/steel_catwalk_side",

View file

@ -1,5 +1,6 @@
{ {
"parent": "block/block", "parent": "block/block",
"render_type": "cutout",
"textures": { "textures": {
"particle": "engineersdecor:block/furniture/steel_table_side_texture", "particle": "engineersdecor:block/furniture/steel_table_side_texture",
"s": "engineersdecor:block/furniture/steel_table_side_texture", "s": "engineersdecor:block/furniture/steel_table_side_texture",

View file

@ -1,6 +1,7 @@
{ {
"parent": "block/block", "parent": "block/block",
"ambientocclusion": false, "ambientocclusion": false,
"render_type": "translucent",
"textures": { "textures": {
"glass": "engineersdecor:block/glass/window_glass_texture", "glass": "engineersdecor:block/glass/window_glass_texture",
"frame": "engineersdecor:block/material/steel_texture", "frame": "engineersdecor:block/material/steel_texture",

View file

@ -1,6 +1,7 @@
{ {
"parent": "block/block", "parent": "block/block",
"ambientocclusion": false, "ambientocclusion": false,
"render_type": "cutout",
"textures": { "textures": {
"particle": "engineersdecor:block/material/steel_texture", "particle": "engineersdecor:block/material/steel_texture",
"frame": "engineersdecor:block/material/steel_texture" "frame": "engineersdecor:block/material/steel_texture"

View file

@ -1,6 +1,7 @@
{ {
"parent": "block/block", "parent": "block/block",
"ambientocclusion": false, "ambientocclusion": false,
"render_type": "cutout",
"textures": { "textures": {
"particle": "engineersdecor:block/material/steel_texture", "particle": "engineersdecor:block/material/steel_texture",
"frame": "engineersdecor:block/material/steel_texture" "frame": "engineersdecor:block/material/steel_texture"

View file

@ -1,6 +1,7 @@
{ {
"parent": "block/block", "parent": "block/block",
"ambientocclusion": false, "ambientocclusion": false,
"render_type": "cutout",
"textures": { "textures": {
"particle": "engineersdecor:block/material/steel_texture", "particle": "engineersdecor:block/material/steel_texture",
"frame": "engineersdecor:block/material/steel_texture" "frame": "engineersdecor:block/material/steel_texture"

View file

@ -1,6 +1,7 @@
{ {
"parent": "block/block", "parent": "block/block",
"ambientocclusion": false, "ambientocclusion": false,
"render_type": "cutout",
"textures": { "textures": {
"particle": "engineersdecor:block/material/steel_texture", "particle": "engineersdecor:block/material/steel_texture",
"frame": "engineersdecor:block/material/steel_texture" "frame": "engineersdecor:block/material/steel_texture"

View file

@ -1,6 +1,7 @@
{ {
"parent": "block/block", "parent": "block/block",
"ambientocclusion": false, "ambientocclusion": false,
"render_type": "cutout",
"textures": { "textures": {
"particle": "engineersdecor:block/material/steel_texture", "particle": "engineersdecor:block/material/steel_texture",
"frame": "engineersdecor:block/material/steel_texture" "frame": "engineersdecor:block/material/steel_texture"

View file

@ -1,5 +1,6 @@
{ {
"parent": "block/block", "parent": "block/block",
"render_type": "cutout",
"textures": { "textures": {
"s": "engineersdecor:block/furniture/steel_table_side_texture", "s": "engineersdecor:block/furniture/steel_table_side_texture",
"particle": "engineersdecor:block/furniture/steel_table_side_texture", "particle": "engineersdecor:block/furniture/steel_table_side_texture",

View file

@ -1 +1,5 @@
{ "parent": "block/cube_all", "textures": { "all": "engineersdecor:block/glass/panzerglass_block_texture0" } } {
"parent": "block/cube_all",
"render_type": "translucent",
"textures": { "all": "engineersdecor:block/glass/panzerglass_block_texture0" }
}

View file

@ -1,5 +1,6 @@
{ {
"parent": "block/block", "parent": "block/block",
"render_type": "translucent",
"textures": { "textures": {
"2": "engineersdecor:block/material/steel_texture", "2": "engineersdecor:block/material/steel_texture",
"particle": "engineersdecor:block/roof/dark_shingle_roof", "particle": "engineersdecor:block/roof/dark_shingle_roof",

Some files were not shown because too many files have changed in this diff Show more