Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ModStrippedLogBlock {
- public static void addStripping() throws NoSuchFieldException, IllegalAccessException {
- Field map = ObfuscationReflectionHelper.findField(AxeItem.class, "field_203176_a");
- Field modifiersField = Field.class.getDeclaredField("modifiers");
- modifiersField.setAccessible(true);
- modifiersField.setInt(map, map.getModifiers() & ~Modifier.FINAL);
- map.setAccessible(true);
- Map<Block, Block> strip_map = (Map<Block, Block>) map.get(null);
- HashMap<Block, Block> new_map = new HashMap<>(strip_map);
- new_map.put(ModBlock.DANDELION_LOG.get(), ModBlock.STRIPPED_DANDELION_LOG.get());
- new_map.put(ModBlock.LEMON_LIME_LOG.get(), ModBlock.STRIPPED_LEMON_LIME_LOG.get());
- new_map.put(ModBlock.SEAFOAM_LOG.get(), ModBlock.STRIPPED_SEAFOAM_LOG.get());
- new_map.put(ModBlock.TROPICAL_LOG.get(), ModBlock.STRIPPED_TROPICAL_LOG.get());
- new_map.put(ModBlock.STRAWBERRRY_LOG.get(), ModBlock.STRIPPED_STRAWBERRY_LOG.get());
- new_map.put(ModBlock.SWEET_STRAWBERRY_LOG.get(), ModBlock.STRIPPED_SWEET_STRAWBERRY_LOG.get());
- new_map.put(ModBlock.LAVENDER_LOG.get(), ModBlock.STRIPPED_LAVENDER_LOG.get());
- new_map.put(ModBlock.MYSTIC_LOG.get(), ModBlock.STRIPPED_MYSTIC_LOG.get());
- map.set(null, new_map);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement